Commit 43303d6f by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/57184 (ICE in expand_expr_real_1, at expr.c:10478)

	PR debug/57184
	* expr.c (expand_expr_addr_expr_1): Handle COMPOUND_LITERAL_EXPR
	for modifier == EXPAND_INITIALIZER.

	* gcc.dg/pr57184.c: New test.

From-SVN: r198666
parent dcbac1a4
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
......
......@@ -7561,6 +7561,15 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
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.
......
/* 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment