This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/7124: -O2 -march=athlon produces ICE


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]