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)
Created attachment 19811 [details] testcase
Confirmed
Created attachment 19813 [details] Reduced test case
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.
(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.
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.