2006-08-25 Fariborz Jahanian <fjahanian@apple.com>
PR c/28418
* c-gimplify.c (gimplify_compound_literal_expr): Don't add
variable again if DECL_SEEN_IN_BIND_EXPR_P.
2006-08-25 Joseph S. Myers <joseph@codesourcery.com>
* gcc.c-torture/compile/compound-literal-1.c: New test.
From-SVN: r116436
+2006-08-25 Fariborz Jahanian <fjahanian@apple.com>
+
+ PR c/28418
+ * c-gimplify.c (gimplify_compound_literal_expr): Don't add
+ variable again if DECL_SEEN_IN_BIND_EXPR_P.
+
2006-08-25 Joseph S. Myers <joseph@codesourcery.com>
PR c/28299
/* This decl isn't mentioned in the enclosing block, so add it to the
list of temps. FIXME it seems a bit of a kludge to say that
anonymous artificial vars aren't pushed, but everything else is. */
- if (DECL_NAME (decl) == NULL_TREE)
+ if (DECL_NAME (decl) == NULL_TREE && !DECL_SEEN_IN_BIND_EXPR_P (decl))
gimple_add_tmp_var (decl);
gimplify_and_add (decl_s, pre_p);
+2006-08-25 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/28418
+ * gcc.c-torture/compile/compound-literal-1.c: New test.
+
2006-08-25 Joseph S. Myers <joseph@codesourcery.com>
PR c/28299
--- /dev/null
+/* ICE incrementing compound literal: bug 28418 from Volker Reichelt
+ <reichelt@gcc.gnu.org>. */
+
+struct A { int i; };
+
+void foo()
+{
+ ((struct A) { 0 }).i += 1;
+}