Hi, I use h8300-gcc. Only when optional optimization was applied, compile error occurred in this attached program. If optional optimization is not used, it is possible to execute the program.
------------------------------------------------------------------ This is a command and a compile error message. u...@user-laptop:~/study/error/h8300/exec-error_4.4.0$ /usr/local/gcc-4.4.0_h8300-elf/bin/h8300-elf-gcc error3.c -O2 error3.c: In function 'main': error3.c:24: error: unable to find a register to spill in class 'GENERAL_REGS' error3.c:24: error: this is the insn: (insn 15 14 16 2 error3.c:14 (parallel [ (set (reg:SI 0 r0) (ashiftrt:SI (reg:SI 4 r4 [orig:19 VAR134___0 ] [19]) (reg:QI 0 r0 [orig:24 VAR191___1+3 ] [24]))) (clobber (scratch:QI)) ]) 222 {*shiftsi} (expr_list:REG_DEAD (reg:QI 0 r0 [orig:24 VAR191___1+3 ] [24]) (expr_list:REG_DEAD (reg:SI 4 r4 [orig:19 VAR134___0 ] [19]) (nil)))) error3.c:24: confused by earlier errors, bailing out ------------------------------------------------------------------ package binutils-2.19.1 gcc-4.4.0 newlib-1.17.0 gdb-6.8 gmp-4.3.0 mpfr-2.3.2 ----------------------------------------------------------------- OS u...@user-laptop:~$ uname -a Linux user-laptop 2.6.27-14-generic #1 SMP Tue Jun 30 19:57:39 UTC 2009 i686 GNU/Linux ------------------------------------------------------------------ gcc version Using built-in specs. Target: h8300-elf Configured with: ../gcc-4.4.0/configure --target=h8300-elf --prefix=/usr/local/gcc-4.4.0_h8300-elf/ --disable-nls --enable-languages=c --with-newlib --with-headers=/home/user/build/gcc-4.4.0_h8300-elf/newlib-1.17.0/newlib/libc/include/ --with-gmp=/usr/local/gmp/4.3.0/ --with-mpfr=/usr/local/mpfr/2.4.1/ Thread model: single gcc version 4.4.0 (GCC) ------------------------------------------------------------------ I found other programs that a similar compile error occurred. I appended only one because I don't understood whether I may append everything. Naoya Takeda Kwansei Gakuin University in Japan mail: n-tak...@kwansei.ac.jp
#include <stdio.h> #define printok() printf("@o...@\n") #define printno() printf("@n...@\n") int main (void) { int test = 0; volatile long VAR134 = 0; volatile long VAR191 = 0; test = (VAR134>>VAR191)/5; if(test == 0){ printok(); }else{ printno(); printf("%d\n",test); } return 0; }
error3.i
Description: error3.i