From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4372 invoked by alias); 26 Jun 2002 15:16:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4340 invoked by uid 71); 26 Jun 2002 15:16:01 -0000 Date: Wed, 26 Jun 2002 08:36:00 -0000 Message-ID: <20020626151601.4335.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Reichelt Subject: Re: optimization/7124: -O2 -march=athlon produces ICE Reply-To: Reichelt X-SW-Source: 2002-06/txt/msg00633.txt.bz2 List-Id: The following reply was made to PR optimization/7124; it has been noted by GNATS. From: Reichelt 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 .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