+2013-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/57184
+ * expr.c (expand_expr_addr_expr_1): Handle COMPOUND_LITERAL_EXPR
+ for modifier == EXPAND_INITIALIZER.
+
2013-05-07 Anton Blanchard <anton@samba.org>
* configure.ac (HAVE_LD_LARGE_TOC): Use correct linker emulation
inner = TREE_OPERAND (exp, 0);
break;
+ case COMPOUND_LITERAL_EXPR:
+ /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
+ rtl_for_decl_init is called on DECL_INITIAL with
+ COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */
+ if (modifier == EXPAND_INITIALIZER
+ && COMPOUND_LITERAL_EXPR_DECL (exp))
+ return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
+ target, tmode, modifier, as);
+ /* FALLTHRU */
default:
/* If the object is a DECL, then expand it for its rtl. Don't bypass
expand_expr, as that can have various side effects; LABEL_DECLs for
+2013-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/57184
+ * gcc.dg/pr57184.c: New test.
+
2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/array3.ads: New test.
--- /dev/null
+/* PR debug/57184 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+struct S {};
+void bar (struct S *const);
+static struct S *const c = &(struct S) {};
+
+void
+foo (void)
+{
+ bar (c);
+}