+2011-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/49948
+ * gimple.c (walk_stmt_load_store_addr_ops): Walk CONSTRUCTOR elements.
+
2011-08-03 Anatoly Sokolov <aesok@post.ru>
* config/m32c/m32c.c (class_sizes): Remove.
&& TREE_CODE (OBJ_TYPE_REF_OBJECT (rhs)) == ADDR_EXPR)
ret |= visit_addr (stmt, TREE_OPERAND (OBJ_TYPE_REF_OBJECT (rhs),
0), data);
+ else if (TREE_CODE (rhs) == CONSTRUCTOR)
+ {
+ unsigned int ix;
+ tree val;
+
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (rhs), ix, val)
+ if (TREE_CODE (val) == ADDR_EXPR)
+ ret |= visit_addr (stmt, TREE_OPERAND (val, 0), data);
+ else if (TREE_CODE (val) == OBJ_TYPE_REF
+ && TREE_CODE (OBJ_TYPE_REF_OBJECT (val)) == ADDR_EXPR)
+ ret |= visit_addr (stmt,
+ TREE_OPERAND (OBJ_TYPE_REF_OBJECT (val),
+ 0), data);
+ }
lhs = gimple_assign_lhs (stmt);
if (TREE_CODE (lhs) == TARGET_MEM_REF
&& TREE_CODE (TMR_BASE (lhs)) == ADDR_EXPR)
+2011-08-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/49948
+ * gcc.dg/pr49948.c: New test.
+
2011-08-03 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47383
--- /dev/null
+/* PR tree-optimization/49948 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-parallelize-loops=2" } */
+
+extern int a, *b;
+int
+foo (void)
+{
+ int c, d = 8, *e[8], i;
+ if (a <= 7)
+ {
+ for (i = 0; i < 8; ++i)
+ e[i] = &c;
+ while (--d)
+ {
+ a = 0;
+ b = e[0];
+ }
+ return 0;
+ }
+ return b == &d;
+}