Bug 27001 - ICE with -fschedule-insns -fstack-protector-all
Summary: ICE with -fschedule-insns -fstack-protector-all
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored, ra
: 37659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-03 11:20 UTC by Volker Reichelt
Modified: 2009-11-14 17:07 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-unknown-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-09-28 19:33:29


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2006-04-03 11:20:51 UTC
The following code snippet causes an ICE on x86_64-unknown-linux-gnu
when compiled with "-fschedule-insns -fstack-protector-all".
This happens since 4.1.0 when -fstack-protector-all was introduced.

=========================================================================
int foo(int i)
{
    i /= i+1;
    return 0;
}
=========================================================================

bug.c: In function 'foo':
bug.c:5: error: unable to find a register to spill in class 'AREG'
bug.c:5: error: this is the insn:
(insn 11 21 27 2 (parallel [
            (set (reg:SI 1 dx [61])
                (div:SI (reg:SI 1 dx [orig:63 i ] [63])
                    (reg:SI 2 cx [orig:59 D.1879 ] [59])))
            (set (reg:SI 2 cx [62])
                (mod:SI (reg:SI 1 dx [orig:63 i ] [63])
                    (reg:SI 2 cx [orig:59 D.1879 ] [59])))
            (clobber (reg:CC 17 flags))
        ]) 277 {*divmodsi4_nocltd} (nil)
    (expr_list:REG_DEAD (reg:SI 1 dx [orig:63 i ] [63])
        (expr_list:REG_DEAD (reg:SI 2 cx [orig:59 D.1879 ] [59])
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (expr_list:REG_UNUSED (reg:SI 2 cx [62])
                    (nil))))))
bug.c:5: internal compiler error: in spill_failure, at reload1.c:1912
Please submit a full bug report, [etc.]
Comment 1 Andrew Pinski 2006-04-03 15:06:40 UTC
This is the normal problem of using specific registers for multiplication on x86 and x86_64 so running out of registers is easy :).
Comment 2 Andrew Pinski 2008-09-28 19:33:06 UTC
*** Bug 37659 has been marked as a duplicate of this bug. ***
Comment 3 Volker Reichelt 2009-11-14 17:07:20 UTC
The code compiles without ICE on trunk since at least 2009-09-17.
So lets close it as fixed.