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:
parent
b305db716c
commit
1b80335583
@ -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,
|
||||
|
@ -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];
|
||||
|
@ -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.
|
||||
|
18
gcc/testsuite/g++.dg/abi/param2.C
Normal file
18
gcc/testsuite/g++.dg/abi/param2.C
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user