re PR tree-optimization/39394 (ICE in copy_tree_body_r)
PR tree-optimization/39394 * gimplify.c (gimplify_type_sizes): Gimplify DECL_SIZE and DECL_SIZE_UNIT of variable length FIELD_DECLs. * gcc.c-torture/compile/pr39394.c: New test. From-SVN: r144727
This commit is contained in:
parent
929b7fc3c0
commit
9a9ba8d9b1
4 changed files with 41 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-03-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/39394
|
||||
* gimplify.c (gimplify_type_sizes): Gimplify DECL_SIZE and
|
||||
DECL_SIZE_UNIT of variable length FIELD_DECLs.
|
||||
|
||||
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* recog.c (verfiy_changes): Disallow renaming of hard regs in
|
||||
|
|
|
@ -7141,6 +7141,8 @@ gimplify_type_sizes (tree type, gimple_seq *list_p)
|
|||
if (TREE_CODE (field) == FIELD_DECL)
|
||||
{
|
||||
gimplify_one_sizepos (&DECL_FIELD_OFFSET (field), list_p);
|
||||
gimplify_one_sizepos (&DECL_SIZE (field), list_p);
|
||||
gimplify_one_sizepos (&DECL_SIZE_UNIT (field), list_p);
|
||||
gimplify_type_sizes (TREE_TYPE (field), list_p);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-03-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/39394
|
||||
* gcc.c-torture/compile/pr39394.c: New test.
|
||||
|
||||
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* gcc.target/s390/20090223-1.c: New testcase.
|
||||
|
|
28
gcc/testsuite/gcc.c-torture/compile/pr39394.c
Normal file
28
gcc/testsuite/gcc.c-torture/compile/pr39394.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* PR tree-optimization/39394 */
|
||||
|
||||
char *p;
|
||||
int x;
|
||||
|
||||
static inline void
|
||||
f1 (int n)
|
||||
{
|
||||
asm volatile ("" : "=m" (*(struct { char x[n]; } *) p));
|
||||
}
|
||||
|
||||
static inline void
|
||||
f2 (void)
|
||||
{
|
||||
x ? f1 (1) : f1 (2);
|
||||
}
|
||||
|
||||
static inline void
|
||||
f3 (void)
|
||||
{
|
||||
f2 ();
|
||||
}
|
||||
|
||||
void
|
||||
f4 (void)
|
||||
{
|
||||
f3 ();
|
||||
}
|
Loading…
Add table
Reference in a new issue