OSDN Git Service

Add default handling for outermost wrappers in voidify_wrapper_expr.
authortorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Dec 2011 12:05:01 +0000 (12:05 +0000)
committertorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Dec 2011 12:05:01 +0000 (12:05 +0000)
gcc/
* gimplify.c (voidify_wrapper_expr): Add default handling for
outermost wrapper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182232 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gimplify.c

index eed29f0..17be451 100644 (file)
@@ -1,5 +1,10 @@
 2011-12-12  Torvald Riegel  <triegel@redhat.com>
 
+       * gimplify.c (voidify_wrapper_expr): Add default handling for
+       outermost wrapper.
+
+2011-12-12  Torvald Riegel  <triegel@redhat.com>
+
        * tree-ssa-tail-merge.c (gimple_equal_p): Don't treat transaction
        commits as equal.
 
index f548e70..fe8d2f8 100644 (file)
@@ -1081,6 +1081,15 @@ voidify_wrapper_expr (tree wrapper, tree temp)
              break;
 
            default:
+             /* Assume that any tree upon which voidify_wrapper_expr is
+                directly called is a wrapper, and that its body is op0.  */
+             if (p == &wrapper)
+               {
+                 TREE_SIDE_EFFECTS (*p) = 1;
+                 TREE_TYPE (*p) = void_type_node;
+                 p = &TREE_OPERAND (*p, 0);
+                 break;
+               }
              goto out;
            }
        }