OSDN Git Service

PR c++/51852
[pf3gnuchains/gcc-fork.git] / gcc / cp / cp-gimplify.c
index af45f59..e06c545 100644 (file)
@@ -475,10 +475,10 @@ gimplify_must_not_throw_expr (tree *expr_p, gimple_seq *pre_p)
 
   gimplify_and_add (body, &try_);
   mnt = gimple_build_eh_must_not_throw (terminate_node);
-  gimplify_seq_add_stmt (&catch_, mnt);
+  gimple_seq_add_stmt_without_update (&catch_, mnt);
   mnt = gimple_build_try (try_, catch_, GIMPLE_TRY_CATCH);
 
-  gimplify_seq_add_stmt (pre_p, mnt);
+  gimple_seq_add_stmt_without_update (pre_p, mnt);
   if (temp)
     {
       *expr_p = temp;
@@ -569,7 +569,8 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
        else if ((is_gimple_lvalue (op1) || INDIRECT_REF_P (op1)
                  || (TREE_CODE (op1) == CONSTRUCTOR
-                     && CONSTRUCTOR_NELTS (op1) == 0)
+                     && CONSTRUCTOR_NELTS (op1) == 0
+                     && !TREE_CLOBBER_P (op1))
                  || (TREE_CODE (op1) == CALL_EXPR
                      && !CALL_EXPR_RETURN_SLOT_OPT (op1)))
                 && is_really_empty_class (TREE_TYPE (op0)))
@@ -1099,6 +1100,8 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
       wtd->omp_ctx = omp_ctx.outer;
       splay_tree_delete (omp_ctx.variables);
     }
+  else if (TREE_CODE (stmt) == CONVERT_EXPR)
+    gcc_assert (!CONVERT_EXPR_VBASE_PATH (stmt));
 
   pointer_set_insert (p_set, *stmt_p);