tdw%computer-lab.cambridge.ac.uk@NSFNET-RELAY.AC.UK (01/16/90)
To readers of gnu.g++.bug with Decstations:
------------------------------------------
Perhaps someone would be kind enough to tell me whether g++ is known
to work (or not to work) on Decstations? And if it does work (as I
hope), what patches (in addition to Dirk Grunwald's) or more recent
versions of the sources should I use? This info might be worth
posting... Thanks in advance.
Here are some bug reports relating to my attempt to install g++ on a
3100.
Report 1: "Trouble linking the library"
========================================
VERSION: g++ 1.36.1 and gcc1.36 with Dirk Grunwald's patches for MIPS
FILES: libg++ 1.36.0, last entry in the ChangeLog dated
Wed Nov 8 06:19:39 1989 Doug Lea
COMMAND: make tests for libg++
SYSTEM: Decstation 3100 (MIPS) running Ultrix 3.1A
BUG: link step on tRandom.cc and others fails, becuase of undefined
external _abort.
SUGGESTION:
Line 984 in cplus-decl2.c:
/* @@ Assume names have underscores. */
if (asmspec_abort == 0)
asmspec_abort = build_string (strlen ("_abort"), "_abort");
On this system, names don't have underscores!
Report 2: "The compiler spat out one of the test programs"
==========================================================
After removing the underscores, and recompiling g++, I returned to
compiling the test programs. I found that test program tPlex.cc would
not compile:
gcc version 1.36.1 (based on GCC 1.36)
/usr/groups/pnd1/gcc-1.36/mips_ultrix/lib/gcc-cpp -+ -v -I/usr/groups/pnd1/g++/libg++/mips_ultrix/g++-include -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmips -Dunix -D__mips__ -D__unix__ -D__OPTIMIZE__ -Wall -DR3000 -DLANGUAGE_C -DMIPSEL -DSYSTYPE_BSD -Dultrix tPlex.cc /usr/tmp/cca18538.cpp
GNU CPP version 1.36
/usr/groups/pnd1/gcc-1.36/mips_ultrix/lib/gcc-cc1plus /usr/tmp/cca18538.cpp -O -fstrength-reduce -fomit-frame-pointer -quiet -dumpbase tPlex.cc -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized -O -Wall -version -o /usr/tmp/cca18538.s
GNU C++ version 1.36.1 (based on GCC 1.36) compiled by GNU C version 1.36.
default target switches: -munix -mnofixed-ovfl -mG0 -mG1
tPlex.cc: In function void MPtest ():
tPlex.cc:535: The following insn was not recognizable:
(insn/i 117 116 118 (set (reg:SI 93)
(neg:SI (mem/s:SI (plus:SI (reg:SI 87)
(const_int 4))))) -1 (nil)
(nil))
/usr/groups/pnd1/gcc-1.36/mips_ultrix/bin/g++: Program cc1plus got
fatal signal 4.
(I'm not sending a complete input file, since I trust the library
sources are `well known'.)
Report 3: "Some of the test programs crashed"
=============================================
tPlex.cc compiled successfully when I removed the -O and -f* switches,
and I compiled the rest of the test programs with the switches shown
above (ie the default switched from the makefile).
Several of them failed, though; here is the difference listing:
(The first difference is expected--see "for i in ...";
boring bits deleted)
cat checktests.diffs
1c1
< for i in test0 tFile tObstack tString tInteger twrapper tgwrapper tRational tComplex tBitSet tBitString tRandom tFix tFix16 tFix24 tCurses tGetOpt tList tPlex tLList tVec tStack tQueue tDeque tPQ tSet tSet2 tBag tBag2 tMap ; do \
---
> for i in tFile tObstack tString tInteger twrapper tgwrapper tRational tComplex tBitSet tBitString tRandom tFix tFix16 tFix24 tCurses tGetOpt tList tPlex tLList tVec tStack tQueue tDeque tPQ tSet tSet2 tBag tBag2 tMap ; do \
9d8
< Must run test0 from tty
17c16
< enter a float then a double:first = 123.456
---
> enter a float then a double:first = -.014313
64,94c63
<
< unique words:
< deleted
[...]
< is
< This
<
<
< Obstack vars:
< alignment_mask = 3
< chunk_size = 4092
< size = 0
< room = 4068
<
< end of test
---
> /bin/sh: 20176 Memory fault - core dumped
144,185c113,114
< one = 1
< one + 1 = 2
< two = 2
< fact30 = factorial(30) = 265252859812191058636308480000000
< fact28 = factorial(28) = 304888344611713860501504000000
< fact30 + fact28 = 265557748156802772496809984000000
< fact30 - fact28 = 264947971467579344775806976000000
< fact30 * fact28 = 80872505331661933764010628483512781121876047953920000000000000
< fact30 / fact28 = 870
< fact30 % fact28 = 0
< -fact30 = -265252859812191058636308480000000
[...]
< enter an Integer: number = 12345678901234567890
<
< End of test
---
> Failed assertion result == fact28 at line 315 of `tInteger.cc'.
> /bin/sh: 20180 Illegal instruction - core dumped
205,244c134,135
< one = 1
< third = 1/3
< half = 1/2
[...]
<
< End of test
---
> Failed assertion (a * (b + c)) == ((a * b) + (a * c)) at line 28 of `tRational.cc'.
> /bin/sh: 20190 Illegal instruction - core dumped
[Stats differences deleted]
521c412
< 1073741824 = 1.07374e+09
---
> 1073741824 = 2.81472e+14
547c438
< man = ccccccc8000
---
> man = ffff0ccbcccb8000
----------------------------------------------------------------------
I hope this info is of use to someone.
Tim
---
Tim Wilson | tdw@uk.ac.cam.cl | U of Cambridge Computer Lab,
| ...!uunet!mcvax!ukc!cam-cl!tdw | New Museums Site, Pembroke
Research | tdw%cl.cam.ac.uk@nsfnet-relay.ac.uk | St, Cambridge, UK, CB2 3QG
assistant | +44 223 334624; Fax +44 223 334679 | (But not speaking for them)