optimization flags -O2 -march=athlon produce an ICE. clacrt.c: In function `clacrt_': clacrt.c:136: error: unable to find a register to spill in class `FLOAT_REGS' clacrt.c:136: error: this is the insn: (insn:HI 109 108 112 9 0x401a6100 (set (subreg:SF (reg/v:DI 30 rmm1 [71]) 0) (minus:SF (reg:SF 12 st(4) [94]) (reg:SF 8 st(0) [97]))) 556 {*fop_sf_1_nosse} (insn_list 107 (insn_list 104 (nil))) (expr_list:REG_DEAD (reg:SF 8 st(0) [97]) (expr_list:REG_DEAD (reg:SF 12 st(4) [94]) (nil)))) clacrt.c:136: internal compiler error: Internal compiler error in spill_failure, at reload1.c:1908 Release: gcc version 3.2 20020625 (experimental) Environment: RedHat Linux 7.1 / Athlon 1.3GHz How-To-Repeat: gcc -c -O2 -march=athlon clacrt.i ICE does NOT happen for gcc -c -O2 clacrt.i
From: Reichelt <reichelt@igpm.rwth-aachen.de> To: gcc-gnats@gcc.gnu.org, perrin@MSLI.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: optimization/7124: -O2 -march=athlon produces ICE Date: Wed, 26 Jun 2002 17:46:42 +0200 Hi, the test example can be reduced a little, so that it still crashes the compiler: -------------------------snip here------------------------------- void foo () { struct { float x, y; } c, *cp; static float z; while (1) { c.y = cp->y + cp->y; z = c.y + 1.0; } } -------------------------snip here------------------------------- Just compile this with "gcc -O -march=athlon -c" on a i686-pc-linux-gnu box. With gcc 3.1 one gets: clacrt.c: In function `foo': clacrt.c:11: Internal compiler error in ix86_secondary_memory_needed, at config/i386/i386.c:12251 Please submit a full bug report, [etc.] With the main trunk one gets: clacrt.c: In function `foo': clacrt.c:11: error: insn does not satisfy its constraints: (insn 58 23 57 1 (nil) (set (reg:SF 30 emm1) (reg:SF 8 st(0))) 90 {*movsf_1} (nil) (nil)) clacrt.c:11: internal compiler error: Internal compiler error in reload_cse_simplify_operands, at reload1.c:8311 Please submit a full bug report, [etc.] However, if one changes the position of x and y in the struct one gets: clacrt.c: In function `foo': clacrt.c:11: error: unable to find a register to spill in class `FLOAT_REGS' clacrt.c:11: error: this is the insn: (insn 23 22 25 1 0x4018cfc0 (set (subreg:SF (reg/v:DI 29 rmm0 [58]) 0) (plus:SF (reg:SF 8 st(0) [61]) (mem/s/j:SF (reg/v/f:SI 0 eax [59]) [0 <variable>.y+0 S4 A32]))) 546 {*fop_sf_comm_nosse} (insn_list 21 (nil)) (expr_list:REG_DEAD (reg:SF 8 st(0) [61]) (nil))) clacrt.c:11: internal compiler error: Internal compiler error in spill_failure, at reload1.c:1908 Please submit a full bug report, [etc.] The bug is a regression from gcc 3.0.x. Greetings, Volker Reichelt http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7124
Responsible-Changed-From-To: unassigned->rth Responsible-Changed-Why: .
State-Changed-From-To: open->closed State-Changed-Why: http://gcc.gnu.org/ml/gcc-patches/2002-10/msg00121.html