I've been tracking bug #16719 as it's been of interest to me. I noticed
Bernardo Innocenti had committed some changes to the Coldfire code that should
have resolved this problem. I picked up gcc-4.1-20050826 to try the new code.
My compiler ICEd with a different problem, but I was able to reproduce with a
simple test case.
I will attach the preprocessed file.
Here is the command line used to compile the file and trigger the ICE, and the
resultant output.
[EMAIL PROTECTED] bretts]$ /opt/rtems/bin/m68k-rtems-gcc -Wall -Wsign-compare -W
-Wno-unused -Wshadow -m5206e -O2 -fomit-frame-pointer -funroll-loops -save-temps
-S -o safer.s safer.c
safer.c: In function 'safer_ecb_encrypt':
safer.c:14: error: unable to find a register to spill in class 'ADDR_REGS'
safer.c:14: error: this is the insn:
(insn 57 56 59 6 (set (reg:SI 9 %a1 [87])
(plus:SI (subreg:SI (reg/v:QI 6 %d6 [orig:86 c ] [86]) 0)
(subreg:SI (mem:QI (plus:SI (reg/v/f:SI 10 %a2 [orig:78 key.48 ]
[78])
(const_int 3 [0x3])) [0 S1 A8]) 0))) 96 {*addsi3_5200}
(nil)
(expr_list:REG_DEAD (reg/v:QI 6 %d6 [orig:86 c ] [86])
(nil)))
safer.c:14: internal compiler error: in spill_failure, at reload1.c:1889
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Here is the compiler build information....
[EMAIL PROTECTED] bretts]$ /opt/rtems/bin/m68k-rtems-gcc -v
Using built-in specs.
Target: m68k-rtems
Configured with: ../gcc-4.1-20050826/configure --target=m68k-rtems
--prefix=/opt/rtems --with-gnu-as --with-gnu-ld --with-newlib --verbose
--with-system-zlib --disable-nls --enable-version-specific-runtime-libs
--enable-threads=rtems --enable-languages=c,c++
Thread model: rtems
gcc version 4.1.0 20050826 (experimental)
--
Summary: [ColdFire] Illegal move of byte intoo address register
causes compiler to ICE
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brett dot swimley at aedinc dot net
CC: bernie at develer dot com,gcc-bugs at gcc dot gnu dot
org,joel at oarcorp dot com,peter at the-baradas dot
com,ralf dot corsepius at rtems dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23695