diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-07 08:28:01 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-07 08:28:01 +0000 |
commit | 03404fe6f86b46fd9b14ee9f6a050051b889b217 (patch) | |
tree | 4eccbeedfec96113534f93b0dbaed919ec83c5f3 /gcc/expr.c | |
parent | 080ec2e380fb58bb76a9441199538f99f59f54ff (diff) | |
download | gcc-03404fe6f86b46fd9b14ee9f6a050051b889b217.tar.gz |
PR debug/57184
* expr.c (expand_expr_addr_expr_1): Handle COMPOUND_LITERAL_EXPR
for modifier == EXPAND_INITIALIZER.
* gcc.dg/pr57184.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index acf282e7808..5663408b37b 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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 |