I found "unable to find a register to spill in class 'SIREG'" error by following example. % cat tst.c void fun(void) { register int val1 asm("esi"); int val2; if (val2) { val2 = memcmp((void*)1, (void*)2, 3); } baz(val1, val2); } % gcc -v -O2 -c tst.c Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2.1/configure --prefix=/home/src/gcc/gcc-4.2.1 --enable-languages=c Thread model: posix gcc version 4.2.1 /home/src/gcc/gcc-4.2.1/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1 -quiet -v tst.c -quiet -dumpbase tst.c -mtune=generic -auxbase tst -O2 -version -o /tmp/cctXZKrk.s ignoring nonexistent directory "/home/src/gcc/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /home/src/gcc/gcc-4.2.1/include /home/src/gcc/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/include /usr/include End of search list. GNU C version 4.2.1 (i686-pc-linux-gnu) compiled by GNU C version 4.2.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 192e817f7ff889e169228e9a0338c840 tst.c: In function 'fun': tst.c:10: error: unable to find a register to spill in class 'SIREG' tst.c:10: error: this is the insn: (insn:HI 21 20 22 3 (parallel [ (set (reg:CC 17 flags) (compare:CC (mem:BLK (reg/f:SI 0 ax [62]) [0 S3 A8]) (mem:BLK (reg/f:SI 5 di [63]) [0 S3 A8]))) (use (reg:SI 2 cx [64])) (use (const_int 1 [0x1])) (use (reg:SI 19 dirflag)) (clobber (reg/f:SI 0 ax [62])) (clobber (reg/f:SI 5 di [63])) (clobber (reg:SI 2 cx [64])) ]) 528 {*cmpstrnqi_nz_1} (insn_list:REG_DEP_TRUE 17 (insn_list:REG_DEP_TRUE 18 (insn_list:REG_DEP_TRUE 19 (insn_list:REG_DEP_TRUE 20 (nil))))) (expr_list:REG_DEAD (reg:SI 19 dirflag) (expr_list:REG_DEAD (reg:SI 2 cx [64]) (expr_list:REG_DEAD (reg/f:SI 0 ax [62]) (expr_list:REG_DEAD (reg/f:SI 5 di [63]) (expr_list:REG_UNUSED (reg:SI 2 cx [64]) (expr_list:REG_UNUSED (reg/f:SI 5 di [63]) (expr_list:REG_UNUSED (reg/f:SI 0 ax [62]) (expr_list:REG_EQUAL (compare:CC (mem:BLK (const_int 1 [0x1]) [0 S3 A8]) (mem:BLK (const_int 2 [0x2]) [0 S3 A8])) (nil)))))))))) tst.c:10: confused by earlier errors, bailing out
Will be fixed on trunk by http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00269.html *** This bug has been marked as a duplicate of 11001 ***