building spidermonkey-1.5 with -O1 -fforce-addr with gcc-4.1.1 and gcc ICEs: jsmath.c: In function 'math_round': jsmath.c:394: error: unrecognizable insn: (insn 61 93 62 4 (parallel [ (set (mem/i:DF (reg/f:SI 95) [0 S8 A32]) (neg:DF (mem/i:DF (reg/f:SI 96) [0 S8 A32]))) (use (const_int 0 [0x0])) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) jsmath.c:394: internal compiler error: in instantiate_virtual_regs_in_insn, at function.c:1555 this sort of looks like PR23196, but that is fixed in my 4.1.1 verified on Gentoo and Debian
Created attachment 11725 [details] jsmath.i
Confirmed. Requires -O -fforce-addr -march=i686. void math_round() { double x; foo(x, __builtin_copysign(bar(), x)); } works on the mainline.
*** Bug 28667 has been marked as a duplicate of this bug. ***
I wonder what fixed this on the mainline - janis?
A regression hunt using the testcase and options from comment #2 with an i686-linux cross compiler identified the following patch which fixed the bug on mainline: http://gcc.gnu.org/viewcvs?view=rev&rev=114293 r114293 | sayle | 2006-06-01 01:37:17 +0000 (Thu, 01 Jun 2006)
P2, rather than P1, due to use of relatively obscure command-line option.
r125879 | jakub | 2007-06-20 02:50:23 -0400 (Wed, 20 Jun 2007) | 6 lines PR middle-end/32285 * calls.c (precompute_arguments): Also precompute CALL_EXPR arguments if ACCUMULATE_OUTGOING_ARGS. * gcc.c-torture/execute/20070614-1.c: New test. on the gcc-4.1 branch made this go away. unsure if it is a real fix, or not though.
Closing 4.1 branch. Not updating known-to-fail since logs suggest it might in fact be fixed there.