Bug 42981

Summary: internal compiler error: in default_secondary_reload, at targhooks.c:660
Product: gcc Reporter: Khem Raj <raj.khem>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: gcc-bugs, mikpelinux, ramana
Priority: P3 Keywords: ice-on-valid-code
Version: 4.4.4   
Target Milestone: ---   
Host: x86_64-linux-gnu Target: arm-none-eabi
Build: x86_64-linux-gnu Known to work: 4.5.0
Known to fail: 4.4.2 4.4.4 Last reconfirmed: 2010-02-06 13:21:34
Attachments: testcase
Reduced test case

Description Khem Raj 2010-02-06 00:05:08 UTC
gcc ICE's when compiling attached example

arm-none-eabi-gcc lib_pad.i -c -O  -fPIC -mthumb

../ncurses/./base/lib_pad.c: In function ‘pnoutrefresh’:
../ncurses/./base/lib_pad.c:218: internal compiler error: in default_secondary_reload, at targhooks.c:660
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Target: arm-none-eabi
Configured with: ../sources/gcc-4_4-branch/configure --target=arm-none-eabi --prefix=/scratch/oss/baremetal/arm-none-eabi/tools --enable-languages=c,c++ --with-newlib
Thread model: single
gcc version 4.4.4 20100203 (prerelease) (GCC)
Comment 1 Khem Raj 2010-02-06 00:06:26 UTC
Created attachment 19811 [details]
testcase
Comment 2 Richard Earnshaw 2010-02-06 13:21:34 UTC
Confirmed
Comment 3 Richard Earnshaw 2010-02-06 13:22:25 UTC
Created attachment 19813 [details]
Reduced test case
Comment 4 Mikael Pettersson 2010-02-06 21:08:00 UTC
A bisection has identified this as a regression on 4.4 branch triggered by r147081, the fix for PR39914. The same change was committed to trunk too, but for some reason doesn't trigger the ICE there.
Comment 5 Mikael Pettersson 2010-02-07 11:17:23 UTC
(In reply to comment #4)
> A bisection has identified this as a regression on 4.4 branch triggered by
> r147081, the fix for PR39914. The same change was committed to trunk too, but
> for some reason doesn't trigger the ICE there.

Trunk also ICEd on this test case for a while, but that was fixed by r147282,
one of several fixes to fwprop/df-problems.
Comment 6 Mikael Pettersson 2010-02-07 11:54:19 UTC
gcc-4.5-20100204 ICEs with -O1 -fno-forward-propagate -fPIC -mthumb on the original test case. So r147282, which enabled fwprop at -O1, merely masked the problem.