re PR target/20795 (ICE in assign_parms)

PR target/20795
	* config/i386/i386.c (construct_container): Pass empty aligned
	struct, union or class in memory.

	* g++.dg/abi/param2.C: New test.

From-SVN: r97912
This commit is contained in:
Jakub Jelinek 2005-04-09 19:09:49 +02:00 committed by Jakub Jelinek
parent b305db716c
commit 1b80335583
4 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-04-09 Jakub Jelinek <jakub@redhat.com>
PR target/20795
* config/i386/i386.c (construct_container): Pass empty aligned
struct, union or class in memory.
2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
* dominance.c, gthr-win32.h, reg-stack.c, tree-ssa-copy.c,

View File

@ -2682,6 +2682,11 @@ construct_container (enum machine_mode mode, enum machine_mode orig_mode,
abort ();
}
}
/* Empty aligned struct, union or class. */
if (nexps == 0)
return NULL;
ret = gen_rtx_PARALLEL (mode, rtvec_alloc (nexps));
for (i = 0; i < nexps; i++)
XVECEXP (ret, 0, i) = exp [i];

View File

@ -1,3 +1,8 @@
2005-04-09 Jakub Jelinek <jakub@redhat.com>
PR target/20795
* g++.dg/abi/param2.C: New test.
2005-04-09 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/builtins-53.c: New test.

View File

@ -0,0 +1,18 @@
// PR target/20795
// Test passing aligned empty aggregate
// { dg-do compile }
struct S { union {} a; } __attribute__((aligned));
S
foo (S arg)
{
return arg;
}
void
bar (void)
{
S arg;
foo (arg);
}