schmidt%crimee.ics.uci.edu@ORION.CF.UCI.EDU ("Douglas C. Schmidt") (11/20/88)
Hi,
The following short program kills g++ 1.27 on the sun 4. Here's
the code:
----------------------------------------
main ( ) {
int j;
j = ({register int _x = 7; ( (!_x) ? 1 :
(_x-=1,_x|=_x>>1,_x|=_x>>2,_x|=_x>>4,
_x|=_x>>8,_x|=_x>>16,(_x+1) ) );});
}
----------------------------------------
and here's the diagnostic:
----------------------------------------
g++ version 1.27.0
echo use .cc filename extension!
use .cc filename extension!
/usr/public/lib/g++/gcc-cpp+ -v -I/cd/ua/schmidt/include/ -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -+ food.c /tmp/cca08005.cpp
GNU CPP version 1.27.0
/usr/public/lib/g++/gcc-c++ /tmp/cca08005.cpp -quiet -dumpbase food.c -finline-functions -fmemoize-lookups -fsave-memoized -fchar-charconst -version -o /tmp/cca08005.s
food.c:5: Segmentation violation
/usr/public/g++: Program c++ got fatal signal 11.
----------------------------------------
this source code works fine with gcc 1.28 on the sparc.
Doug