gcc-2.95.1 bug ( SPARC 64 bit mode )

Denis Golubev dlg@jet.msk.su
Fri Aug 20 03:25:00 GMT 1999


 

   Hello. 

  I build gcc-2.95.1 for sparc-sun-solaris7 ( bi-arch 32/64 bit )

  64 bit compiler generate bug :

  $ gcc -m64 -c t3fault.c
t3fault.c: In function `foo':
t3fault.c:6: Internal compiler error in `sparc_emit_set_const32', at 
./config/sparc/sparc.c:1182

  t3fault.c :
      1 void foo(short *q, int *u)
      2 {
      3   short p;
      4   int   c;
      5   c = -2147483648;
      6   p = -32768;
      7   *q = p;
      8   *u = c;
      9 }

 Bug is generated by short int constant -32768   ( -32767 - OK )

 32 bit compiler doesn't generate this bug.

    
  $ gcc -m64 -O -c t3fault.c  - OK

  If any optimization is ON - compliation is OK .

Regards,

Denis


---------------------------------
Denis Golubev, Moscow, Russia
Jet Infosystems Technical Staff
Phone: (+7 095) 973-48-48  E-mail: dlg@jet.msk.su
Fax:   (+7 095) 973-48-42




More information about the Gcc-bugs mailing list