re PR middle-end/64067 (ICE in expand_expr_real_1, at expr.c:10540, involving compoun...
authorJakub Jelinek <jakub@redhat.com>
Thu, 27 Nov 2014 11:04:16 +0000 (12:04 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 27 Nov 2014 11:04:16 +0000 (12:04 +0100)
commit30d5d8c5189064c8ae30a4af232642077105ed80
treeba75a22c11ee8ec8565979f197bbccd16dce63b5
parent6c9e85fb8b2fffbdac9c3170c98497d6d1bdc26b
re PR middle-end/64067 (ICE in expand_expr_real_1, at expr.c:10540, involving compound literal shenanigans)

PR middle-end/64067
* expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
not only if modifier is EXPAND_INITIALIZER, but whenever
COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.

* gcc.c-torture/compile/pr64067.c: New test.

From-SVN: r218121
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr64067.c [new file with mode: 0644]