+2010-09-23 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/45750
+ * gimplify.c (gimplify_expr): Properly pass on GS_ERROR when
+ gimplifying MEM_REF.
+
2010-09-23 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (toc_relative_ok): Delete.
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_reg, fb_rvalue);
- recalculate_side_effects (*expr_p);
+ if (ret == GS_ERROR)
+ break;
+ recalculate_side_effects (*expr_p);
*expr_p = fold_build2_loc (input_location, MEM_REF,
TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0),
}
ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
is_gimple_mem_ref_addr, fb_rvalue);
+ if (ret == GS_ERROR)
+ break;
recalculate_side_effects (*expr_p);
ret = GS_ALL_DONE;
break;
+2010-09-23 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/45750
+ * gcc.dg/pr45750.c: New testcase.
+
2010-09-23 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/torture/stackalign/alloca-4.c: Remove -m32 from dg-options.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct S
+{
+ int i;
+};
+
+int invalid[] = 0; /* { dg-error "invalid initializer" } */
+
+void foo (void)
+{
+ if (((struct S *)undeclared)->i); /* { dg-error "undeclared" } */
+}
+
+/* { dg-message "reported only once" "" { target *-*-* } 13 } */