davidm@nixtor.uucp (David Macklem) (11/09/90)
In the last little while I've compiled gcc, g++ and libg++ on an SCO Unix System V machine (actually SCO Open Desktop 1.0) and I am running into problems with g++/libg++. I believe that gcc has been ported correctly because after making the compiler I compiled about 10 meg of source and ran some relatively extensive regression tests on the result with no problems. However, g++ is asserting and then dumping core when trying to compile libg++/tests/tFix16.cc and tFix24.cc. I have narrowed down the problem to the following line and ones like it: mantissa(a)=8192; Whether or not optimization is used in the gcc, g++ or libg++ build doesn't make a difference to the above result. Since I'm neither a C++ expert nor a GNU-phile perhaps someone could tell where to start looking as I'm totally stumped now. Some of the particulars of the port are: neither gas nor gnu-ld gcc: 1.37.0 - configured with 'config.gcc sysv-i386' - no 80387 instructions - changes to tm.h: #define NO_DOLLAR_IN_LABEL 1 #define TARGET_DEFAULT 0 - (hard-params cannot determine precision for float, double or long double expressions, for some reason!!!) - OBSTACK=obstack.o - system malloc.o, not GNU malloc.o g++: 1.37.2 - configured with 'config.g++ sysv-i386' - compiled with: -DFASCIST_ASSEMBLER -DUSE_COLLECT -DCOFF -DUSG_STDIO libg++: 1.37.0 (I can't find 1.37.2 - no Internet access) - g++-include/stdio.h changes: #define IOBUF_FLAG_TYPE char #define _NFILE 60 #define SPRINTF_RETURNS_INT For those who might be interested here is the output from 'make tests'. (cd tests; make checktests GXX="g++" GXXFLAGS="-DUSG -I/u/gnu/libg++-1.37.0/g++-include -v -O -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized " GXXLDFLAGS="-L/u/gnu/libg++-1.37.0/src -lg++ -lm " LIBDIR="/usr/local/lib" SRCIDIR="/u/gnu/libg++-1.37.0/g++-include" CC="gcc" CFLAGS="-DUSG -I/usr/local/lib/gcc-include -I/usr/include -I/u/gnu/libg++-1.37.0/g++-include -O -fstrength-reduce -fdelayed-branch " RANLIB="echo" LDXX="" GXXCRT1="/usr/local/lib/crt1+.o" MAKE="make" prefix="/usr/local") g++ -DUSG -I/u/gnu/libg++-1.37.0/g++-include -v -O -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized -c tFix16.cc g++ version 1.37.2 alpha 2 (based on GCC 1.37) /usr/local/lib/gcc-cpp -+ -v -DUSG -I/u/gnu/libg++-1.37.0/g++-include -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dunix -Di386 -D__unix__ -D__i386__ -D__OPTIMIZE__ tFix16.cc /usr/tmp/cca01919.cpp GNU CPP version 1.37 /usr/local/lib/gcc-cc1plus /usr/tmp/cca01919.cpp -quiet -dumpbase tFix16.cc -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized -O -version -o /usr/tmp/cca01919.s GNU C++ version 1.37.2 alpha 2 (based on GCC 1.37) (80386, ATT syntax) compiled by GNU C version 1.37. default target switches: Failed assertion `codel != REFERENCE_TYPE' at line 5510 of `cplus-typeck.c'. g++: Program cc1plus got fatal signal 6. -- David Macklem Siemens Nixdorf Information Systems Ltd. davidm@nixtor.uucp 1131a Leslie Street, Toronto, Ontario uunet!mnetor!nixtor!davidm Canada M3C 3L8 (416-449-0035)