gson@hutcs.hut.fi (Andreas Gustafsson) (07/26/89)
The following source file compiles OK and generates working code using GCC 1.35 without -O. GCC 1.35.95 without -O complains about "inconsistent operand constraints in an `asm'", and _both_ versions die from signal 11 when compiling with -O. Configuration: GCC 1.35 on a Sun 3/50 running SunOS 4.0; GCC 1.35.95 on a Sun 4 running SunOS 4.0. gson@sauna.hut.fi: gcc -v -O crash.c gcc version 1.35.95 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dsparc -Dsun -Dunix -D__sparc__ -D __sun__ -D__unix__ -D__OPTIMIZE__ crash.c /tmp/cca15910.cpp GNU CPP version 1.35.95 /usr/local/lib/gcc-cc1 /tmp/cca15910.cpp -quiet -dumpbase crash.c -O -version - o /tmp/cca15910.s GNU C version 1.35.95 (sparc) compiled by GNU C version 1.35.95. default target switches: -mfpu -mepilogue gcc: Program cc1 got fatal signal 11. ================================ Cut here ================================ static inline long fracmult(x,y) long x,y; { long high; asm("mulsl %3,%1,%0" : "=d" (x), "=d" (high): "0" (x), "d" (y)); return((high<<25) | (x>>7)); } long bar() { return(fracmult(0L,0L)); } ================================ Cut here ================================ -- Andreas Gustafsson Internet: gson@hutcs.hut.fi UUCP: ...uunet!mcvax!santra!hutcs!gson Voice: +358 0 563 5592