From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: Dave Love Cc: Craig Burley , egcs@cygnus.com Subject: Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3 Date: Fri, 26 Jun 1998 07:16:00 -0000 Message-id: References: <199806241515.LAA11786@melange.gnu.org> X-SW-Source: 1998-06/msg00942.html Dave Love writes: > You should use the `g77' driver, which is analagous to the `g++' one Of course! :-) > What's the output from the test in the testsuite g77.log? Executing on host: /l/dsk01/temp/egcs/gcc/g77 -B/l/dsk01/temp/egcs/gcc/ /tmp_mnt/n/temp1/tmp/gcctest/src/egcs-main/gcc/testsuite/g77.f-torture/execute/cabs.f -w -O0 -L/l/dsk01/temp/egcs/libraries/libf2c -lm -o /l/dsk01/temp/egcs/gcc/testsuite/cabs.x PASS: g77.f-torture/execute/cabs.f compilation, -O0 spawn [open ...] Fortran abort routine called The problem seems to have something to do with linking libm before libg2c. Since the testsuite links with -lm but not with -lg2c, ld is called like this: /n/temp1/gcctest/egcs/SunOS-4.1.3/lib/gcc-lib/sparc-sun-sunos4.1.3/egcs-2.91.42/collect2 -e start -dc -dp /lib/crt0.o -L/n/temp1/gcctest/egcs/SunOS-4.1.3/lib/gcc-lib/sparc-sun-sunos4.1.3/egcs-2.91.42 -L/n/temp1/gcctest/egcs/SunOS-4.1.3/sparc-sun-sunos4.1.3/lib -L/n/temp1/gcctest/egcs/SunOS-4.1.3/lib /tmp/cca073921.o -lm -lg2c -lm -lgcc -lc -lgcc Example: oliva@atibaia% ~/egcs/SunOS-4.1.3/bin/g77 -g cabs.f && ./a.out oliva@atibaia% ~/egcs/SunOS-4.1.3/bin/g77 -g cabs.f -lg2c -lm && ./a.out oliva@atibaia% ~/egcs/SunOS-4.1.3/bin/g77 -g cabs.f -lm && ./a.out Fortran abort routine called Abort (core dumped) oliva@atibaia% gdb ./a.out core GNU gdb 4.17 [snip] Program terminated with signal 6, Abort. Reading symbols from /usr/lib/libc.so.1.8...done. Reading symbols from /usr/lib/libdl.so.1.0...done. #0 0xf775c120 in kill () (gdb) where #0 0xf775c120 in kill () #1 0xf777449c in abort () #2 0x565c in sig_die (s=0x3f18 "Fortran abort routine called", kill=1) at /n/temp1/gcctest/bin/../src/egcs/libf2c/libF77/sig_die.c:34 #3 0x3f50 in G77_abort_0 () at /n/temp1/gcctest/bin/../src/egcs/libf2c/libF77/abort_.c:14 #4 0x22fc in MAIN__ () at cabs.f:9 #5 0x3eec in main (argc=1, argv=0xf7fff64c) at /n/temp1/gcctest/bin/../src/egcs/libf2c/libF77/main.c:61 -- Alexandre Oliva mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org http://www.dcc.unicamp.br/~oliva Universidade Estadual de Campinas, SP, Brasil