re PR middle-end/87647 (ICE on valid code in decode_addr_const, at varasm.c:2958)
PR middle-end/87647 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR. * gcc.c-torture/compile/pr87647.c: New test. From-SVN: r265341
This commit is contained in:
parent
79e61dc249
commit
ca66a6cd61
4 changed files with 30 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2018-10-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/87647
|
||||
* varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
|
||||
|
||||
2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* doc/ux.texi: Move @section directly after @node.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-10-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/87647
|
||||
* gcc.c-torture/compile/pr87647.c: New test.
|
||||
|
||||
2018-10-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/85488
|
||||
|
|
15
gcc/testsuite/gcc.c-torture/compile/pr87647.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/pr87647.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* PR middle-end/87647 */
|
||||
|
||||
struct A {};
|
||||
struct A *const b = &(struct A) {};
|
||||
struct B { char *s; struct A *t; };
|
||||
void bar (struct B *);
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
struct B a[] = { "", b, "", b, "", b, "", b, "", b, "", b, "", b, "", b,
|
||||
"", b, "", b, "", b, "", b, "", b, "", b, "", b, "", b,
|
||||
"", b };
|
||||
bar (a);
|
||||
}
|
|
@ -2953,6 +2953,11 @@ decode_addr_const (tree exp, struct addr_const *value)
|
|||
gen_rtx_SYMBOL_REF (Pmode, "origin of addresses"));
|
||||
break;
|
||||
|
||||
case COMPOUND_LITERAL_EXPR:
|
||||
gcc_assert (COMPOUND_LITERAL_EXPR_DECL (target));
|
||||
x = DECL_RTL (COMPOUND_LITERAL_EXPR_DECL (target));
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue