movsi_internal2+1: Internal compiler error for -mips16

Marcel Steenhuizen Marcel.Steenhuizen@ehv.ce.philips.com
Tue Aug 4 06:50:00 GMT 1998


BUG report:

I get an internal compiler error using egcs (snapshot egcs-2.91.53) as a
cross
compiler for target mips-mips-elf using option -mips16. I isolated the
problem
to a small example called test.c:

----------------- begin file: test.c -------------------
int ga;
int gb;
int gc;
int gd;

void a(int aa)
{
  int i;

  for(i=0; i<100; i++)
  {
    if(aa == 1)
    {
      ga = 100;
      gb = ga;
      gc = gb;
      gd = gc;
    }
  }
}
----------------- end file: test.c -------------------

I compile test.c using the following commandline:
  gcc -mips16 -fverbose-asm -ansi -O2 -S test.c
This results in the following error message:

----------------- begin compiler output -------------------
test.c: In function `a':
test.c:20: internal error--insn does not satisfy its constraints:
(insn 143 106 108 (set (reg:SI 8 t0)
        (reg:SI 24 t8)) 228 {movsi_internal2+1} (nil)
    (nil))
toplev.c:1360: Internal compiler error in function fatal_insn
----------------- end compiler output -------------------

Adding -fno-regmove to the commandline seems to avoid the problem:
  gcc -mips16 -fverbose-asm -ansi -O2 -no-regmove -S test.c

Additional information:
-----------------------

The compiler version used:

  gcc -v
  Reading specs from
/home/steenhui/egcs/lib/gcc-lib/mips-elf/egcs-2.91.53/specs
  gcc version egcs-2.91.53 19980803 (gcc2 ss-980609 experimental)

host system:
  sparc-sun-solaris2.5.1

egcs configured with:
  configure --host=sparc-sun-solaris2    \
            --target=mips-elf            \
            --prefix=/home/steenhui/egcs \
            -v                           \
            --with-gnu-as

test.c preprocessed using commandline:
  gcc -mips16 -fverbose-asm -ansi -O2 -E test.c

----------------- begin preprocessed output -------------------
# 1 "test.c"
int ga;
int gb;
int gc;
int gd;

void a(int aa)
{
  int i;

  for(i=0; i<100; i++)
  {
    if(aa == 1)
    {
      ga = 100;
      gb = ga;
      gc = gb;
      gd = gc;
    }
  }
}
----------------- end preprocessed output -------------------

Regards,
Marcel Steenhuizen
Philips CE, Building SFJ-3.50, Eindhoven, The Netherlands
Tel: +31 40 27 36144    Fax: +31 40 27 36027




More information about the Gcc-bugs mailing list