diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-05-07 21:15:33 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-05-07 21:15:33 +0000 |
commit | f7360901e7ed5e12a74473ee00b80e9328a26bc7 (patch) | |
tree | cd5147de28e8c50c622b0bb69b60ffcea6fa8caa /gcc | |
parent | 18455d174e20136859caf15b360c6ba941fb6688 (diff) | |
download | gcc-f7360901e7ed5e12a74473ee00b80e9328a26bc7.zip gcc-f7360901e7ed5e12a74473ee00b80e9328a26bc7.tar.gz gcc-f7360901e7ed5e12a74473ee00b80e9328a26bc7.tar.bz2 |
re PR target/27421 (ICE with invalid array in struct)
PR target/27421
* config/i386/i386.c (classify_argument): Skip fields with invalid
types.
* gcc.dg/array-9.c: New test.
From-SVN: r113609
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/array-9.c | 10 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f3cd34..5f35ff3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR target/27421 + * config/i386/i386.c (classify_argument): Skip fields with invalid + types. + 2006-05-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/27409 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index cb4eaea..a092484 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2961,6 +2961,9 @@ classify_argument (enum machine_mode mode, tree type, { int num; + if (TREE_TYPE (field) == error_mark_node) + continue; + /* Bitfields are always classified as integer. Handle them early, since later code would consider them to be misaligned integers. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7041216..f15d7fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-05-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR target/27421 + * gcc.dg/array-9.c: New test. + 2006-05-07 Richard Guenther <rguenther@suse.de> PR tree-optimization/27409 diff --git a/gcc/testsuite/gcc.dg/array-9.c b/gcc/testsuite/gcc.dg/array-9.c new file mode 100644 index 0000000..f173f65 --- /dev/null +++ b/gcc/testsuite/gcc.dg/array-9.c @@ -0,0 +1,10 @@ +/* PR target/27421 */ +/* { dg-do compile } */ + +struct A +{ + int i; + void x[1]; /* { dg-error "array of voids" } */ +}; + +void foo(struct A a) {} |