re PR target/27421 (ICE with invalid array in struct)

PR target/27421
	* config/i386/i386.c (classify_argument): Skip fields with invalid
	types in unions.

	* gcc.dg/union-3.c: New test.

From-SVN: r114494
This commit is contained in:
Volker Reichelt 2006-06-08 20:50:24 +00:00 committed by Volker Reichelt
parent 524e3576e6
commit 118ed72a74
4 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR target/27421
* config/i386/i386.c (classify_argument): Skip fields with invalid
types in unions.
2006-06-08 Steven Bosscher <steven@gcc.gnu.org>
* cse.c (flush_hash_table): Use VOIDmode to invalidate a REG.

View File

@ -3045,6 +3045,10 @@ classify_argument (enum machine_mode mode, tree type,
if (TREE_CODE (field) == FIELD_DECL)
{
int num;
if (TREE_TYPE (field) == error_mark_node)
continue;
num = classify_argument (TYPE_MODE (TREE_TYPE (field)),
TREE_TYPE (field), subclasses,
bit_offset);

View File

@ -1,3 +1,8 @@
2006-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR target/27421
* gcc.dg/union-3.c: New test.
2006-06-08 Richard Guenther <rguenther@suse.de>
PR middle-end/27116

View File

@ -0,0 +1,10 @@
/* PR target/27421 */
/* { dg-do compile } */
union A
{
int i;
void x[1]; /* { dg-error "array of voids" } */
};
void foo(union A a) {}