[Bug target/28193] config/arm/arm.c:3140 ICE

2006-06-28 Thread sjackman at gmail dot com


--- Comment #2 from sjackman at gmail dot com  2006-06-28 20:18 ---
This proposed patch does help. At the very least, it prevents the ICE on
compiling crtstuff.c while compiling the toolchain. However, with this patch
applied, I saw the same bug later while compiling newlib. As the comment in
thumb_find_work_register suggests, the real bug is probably in
thumb_compute_save_reg_mask.

make[8]: Entering directory
`/home/sjackman/src/toolchain/src/_build/arm-elf/thumb/pic/xip/newlib/libc/stdio'
arm-elf-gcc -B/home/sjackman/src/toolchain/src/_build/arm-elf/newlib/ -isystem
/home/sjackman/src/toolchain/src/_build/arm-elf/newlib/targ-include -isystem
/home/sjackman/src/toolchain/src/newlib/libc/include -DPACKAGE_NAME=\newlib\
-DPACKAGE_TARNAME=\newlib\ -DPACKAGE_VERSION=\1.14.0\
-DPACKAGE_STRING=\newlib\1.14.0\ -DPACKAGE_BUGREPORT=\\  -I.
-I../../../../../../../../newlib/libc/stdio -O2 -D__NO_SYSCALLS__
-DNO_FLOATING_POINT -DHAVE_FCNTL -DHAVE_NANOSLEEP -fno-builtin  -O2 -g -O2 
 -mthumb -fPIC -msingle-pic-base -c -o lib_a-findfp.o `test -f 'findfp.c' ||
echo '../../../../../../../../newlib/libc/stdio/'`findfp.c
../../../../../../../../newlib/libc/stdio/findfp.c: In function 'std':
../../../../../../../../newlib/libc/stdio/findfp.c:61: internal compiler
error:in thumb_find_work_register, at config/arm/arm.c:3173
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
make[8]: *** [lib_a-findfp.o] Error 1
make[8]: Leaving directory
`/home/sjackman/src/toolchain/src/_build/arm-elf/thumb/pic/xip/newlib/libc/stdio'


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193



[Bug target/28193] config/arm/arm.c:3140 ICE

2006-06-28 Thread sjackman at gmail dot com


--- Comment #3 from sjackman at gmail dot com  2006-06-28 20:51 ---
I tried backporting thumb_compute_save_reg_mask from GCC 4.1.1 to GCC 4.0.3
without success. I'll try backporting this entire patch from svn.

2005-03-01  Nick Clifton  [EMAIL PROTECTED]

* config/arm/arm.c (thumb_find_work_register): Check all of the
argument registers to see if they are free, and a couple of
special cases where the last argument register but can be proved
to be available during the function's prologue.
(print_multi_reg, arm_compute_save_reg0_reg12_mask,
output_return_instruction, emit_multi_reg_push, thumb_pushpop,
thumb_unexpanded_epilogue): Use unsigned long as the type for the
register bit-mask.
(thumb_compute_save_reg_mask): Likewise.  Also use
thumb_find_work_register() to ensure that there is agreement about
which work register is going to be used in the prologue.
(thumb_output_function_prologue): Use unsigned long as the type
for the register bit-mask.  Also delay pushing the link register if
other high registers are going to be pushed.
(thumb_compute_save_reg_mask, emit_multi_reg_push,
print_multi-reg, number_of_first_bit_set, thumb_pushpop): Remove
redundant prototypes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193



[Bug target/28193] config/arm/arm.c:3140 ICE

2006-06-28 Thread sjackman at gmail dot com


--- Comment #4 from sjackman at gmail dot com  2006-06-28 22:30 ---
I tried applying r95736 (2005-03-01 Nick Clifton) and r103151 (2005-08-16
Richard Earnshaw) against GCC 4.0.3. Both these patches apply cleanly (with
offsets), but don't fix the problem compiling newlib.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28193