mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-15 11:31:19 +08:00
re PR target/16819 (ICE with empty struct as arg)
gcc/ChangeLog: PR target/16819 * calls.c (load_register_parameters): Don't call use_regs when nregs is zero. gcc/testsuite/ChangeLog: PR target/16891 * gcc.dg/empty2.c: New. From-SVN: r92551
This commit is contained in:
parent
579eab5897
commit
faa003343e
@ -1,3 +1,9 @@
|
||||
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR target/16819
|
||||
* calls.c (load_register_parameters): Don't call use_regs when
|
||||
nregs is zero.
|
||||
|
||||
2004-12-23 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR middle-end/17746
|
||||
|
@ -1554,8 +1554,8 @@ load_register_parameters (struct arg_data *args, int num_actuals,
|
||||
use_group_regs (call_fusage, reg);
|
||||
else if (nregs == -1)
|
||||
use_reg (call_fusage, reg);
|
||||
else
|
||||
use_regs (call_fusage, REGNO (reg), nregs == 0 ? 1 : nregs);
|
||||
else if (nregs > 0)
|
||||
use_regs (call_fusage, REGNO (reg), nregs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-12-23 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
PR target/16891
|
||||
* gcc.dg/empty2.c: New.
|
||||
|
||||
2004-12-23 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* lib/target-supports.exp (check_effective_target_vect_no_align):
|
||||
|
15
gcc/testsuite/gcc.dg/empty2.c
Normal file
15
gcc/testsuite/gcc.dg/empty2.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
double d=0;
|
||||
|
||||
struct A {} a;
|
||||
|
||||
void foo(struct A x)
|
||||
{
|
||||
d=0;
|
||||
}
|
||||
|
||||
void bar()
|
||||
{
|
||||
if (d) foo(a);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user