* gimplify.c (gimplify_addr_expr) <MEM_REF>: New case.
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 14 Oct 2015 21:32:04 +0000 (21:32 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 14 Oct 2015 21:32:04 +0000 (21:32 +0000)
From-SVN: r228828

gcc/ChangeLog
gcc/gimplify.c

index b2a38daec48ba1428aeed5973311aac3065605f9..3b08986ed0ec94881fa7307bb55e9659be4dadcd 100644 (file)
@@ -1,3 +1,7 @@
+2015-10-14  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gimplify.c (gimplify_addr_expr) <MEM_REF>: New case.
+
 2015-10-14  Peter Bergner  <bergner@vnet.ibm.com>
            Torvald Riegel  <triegel@redhat.com>
 
index 071645fc0e33e35aa356598de269056932df8fa8..ab9e540e76d488dc43b1c88547146b44622f407b 100644 (file)
@@ -4985,6 +4985,12 @@ gimplify_addr_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
       ret = GS_OK;
       break;
 
+    case MEM_REF:
+      if (integer_zerop (TREE_OPERAND (op0, 1)))
+       goto do_indirect_ref;
+
+      /* ... fall through ... */
+
     default:
       /* If we see a call to a declared builtin or see its address
         being taken (we can unify those cases here) then we can mark