/* { dg-do compile } */
/* { dg-options "-O2 -fforce-addr" } */
extern int foo (void *, long, double *);
extern int bar (void *, double, long *);
extern double copysign (double, double);
extern double floor (double);
int
test (void *a, long *b, long *c)
{
double x, z;
if (!foo (a, b[0], &x))
return 0;
z = copysign (floor (x + 0.5), x);
return bar (a, z, c);
}
ICEs on i686 with:
A.c: In function 'test':
A.c:18: error: unrecognizable insn:
(insn 48 78 49 4 (parallel [
(set (mem/i:DF (reg/f:SI 80) [0 S8 A32])
(neg:DF (mem/i:DF (reg/f:SI 81) [0 S8 A32])))
(use (const_int 0 [0x0]))
(clobber (reg:CC 17 flags))
]) -1 (nil)
(nil))
A.c:18: internal compiler error: in instantiate_virtual_regs_in_insn, at
function.c:1555
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
The ICE is not present on mainline, guess since the
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01526.html
change where the MEM is forced into register during expand time.
--
Summary: ICE with -fforce-addr
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28667