Bug 28667 - ICE with -fforce-addr
Summary: ICE with -fforce-addr
Status: RESOLVED DUPLICATE of bug 28132
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2006-08-09 18:11 UTC by Jakub Jelinek
Modified: 2006-08-09 18:16 UTC (History)
3 users (show)

See Also:
Target: i686-linux
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2006-08-09 18:11:32 UTC
/* { 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);

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)
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
change where the MEM is forced into register during expand time.
Comment 1 Andrew Pinski 2006-08-09 18:16:03 UTC
This is a dup of bug 28132.

*** This bug has been marked as a duplicate of 28132 ***