cross compiler bug ? (ia64,asm)

Alexandre Oliva aoliva@redhat.com
Thu Jul 3 19:02:00 GMT 2003


On Jul  3, 2003, Wallace Wadge <wwadge@hobsoft.com.mt> wrote:

> In my .S file, I have the following:
> movl r25=(1 << 64) - 1

1 << 64 invokes undefined behavior, since you're shifting by more than
the width of the integer type in bits.  From then on, all bets are
off.  The compiler might have legitimately translated the shift into a
call to abort().

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc-bugs mailing list