re PR c/72816 (ICE on x86_64-linux-gnu (tree check: expected tree that contains ‘decl with RTL’ structure, have ‘field_decl’ in set_decl_rtl, at emit-rtl.c:1282))
PR c/72816 * stor-layout.c (layout_decl): Fix up formatting. (relayout_decl): Allow DECL to be FIELD_DECL. * gcc.dg/pr72816.c: New test. From-SVN: r239218
This commit is contained in:
parent
47e0b45f62
commit
4a9f8a9f7c
4 changed files with 25 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-08-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/72816
|
||||
* stor-layout.c (layout_decl): Fix up formatting.
|
||||
(relayout_decl): Allow DECL to be FIELD_DECL.
|
||||
|
||||
2016-08-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/rs6000/rs6000.md (fix_trunc<mode>si2): Fix mode of reg.
|
||||
|
|
|
@ -596,7 +596,7 @@ layout_decl (tree decl, unsigned int known_align)
|
|||
return;
|
||||
|
||||
gcc_assert (code == VAR_DECL || code == PARM_DECL || code == RESULT_DECL
|
||||
|| code == TYPE_DECL ||code == FIELD_DECL);
|
||||
|| code == TYPE_DECL || code == FIELD_DECL);
|
||||
|
||||
rtl = DECL_RTL_IF_SET (decl);
|
||||
|
||||
|
@ -768,8 +768,8 @@ layout_decl (tree decl, unsigned int known_align)
|
|||
}
|
||||
}
|
||||
|
||||
/* Given a VAR_DECL, PARM_DECL or RESULT_DECL, clears the results of
|
||||
a previous call to layout_decl and calls it again. */
|
||||
/* Given a VAR_DECL, PARM_DECL, RESULT_DECL, or FIELD_DECL, clears the
|
||||
results of a previous call to layout_decl and calls it again. */
|
||||
|
||||
void
|
||||
relayout_decl (tree decl)
|
||||
|
@ -778,7 +778,8 @@ relayout_decl (tree decl)
|
|||
DECL_MODE (decl) = VOIDmode;
|
||||
if (!DECL_USER_ALIGN (decl))
|
||||
SET_DECL_ALIGN (decl, 0);
|
||||
SET_DECL_RTL (decl, 0);
|
||||
if (DECL_RTL_SET_P (decl))
|
||||
SET_DECL_RTL (decl, 0);
|
||||
|
||||
layout_decl (decl, 0);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-08-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/72816
|
||||
* gcc.dg/pr72816.c: New test.
|
||||
|
||||
2016-08-06 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* g++.dg/conversion/pr16333.C: Adjust dg-error regexp.
|
||||
|
|
9
gcc/testsuite/gcc.dg/pr72816.c
Normal file
9
gcc/testsuite/gcc.dg/pr72816.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* PR c/72816 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-std=gnu11" } */
|
||||
|
||||
typedef const int A[];
|
||||
struct S {
|
||||
int a;
|
||||
A b; /* { dg-error "array size missing" } */
|
||||
};
|
Loading…
Add table
Reference in a new issue