This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18548] Miscompiles code generated by Gambit-C Scheme->C compiler
- From: "lucier at math dot purdue dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2004 19:04:56 -0000
- Subject: [Bug middle-end/18548] Miscompiles code generated by Gambit-C Scheme->C compiler
- References: <20041118185317.18548.lucier@math.purdue.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From lucier at math dot purdue dot edu 2004-11-18 19:04 -------
Sorry for hitting return in the summary field ...
This is a catch-all bug report for miscompilations of machine-generated code
that is generated by the Gambit-C Scheme->C compiler. Giovanni Bajo suggested
that I at least document the problem with proper preprocessed files, etc.
All 34 megabytes of the files are at
http://www.math.purdue.edu/~lucier/GNATS/GNATS-16/gambit-test.tgz
They were generated and the bug was verified with the following commands:
[lucier@cohomology gambc40b11]$ env CC='gcc -g -save-temps' ./configure
--enable-single-host
[lucier@cohomology gambc40b11]$ gcc -v
Reading specs from /home/lucier/local/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../configure --prefix=/home/lucier/local/ --enable-languages=c
--enable-checking=no
Thread model: posix
gcc version 4.0.0 20041118 (experimental)
[lucier@cohomology gambc40b11]$ make
<stuff removed>
[lucier@cohomology gambc40b11]$ cd bench
[lucier@cohomology bench]$ ./bench -c no gambit fib
Testing fib under Gambit-C
Compiling...
./bench: line 518: 25754 Segmentation fault LD_LIBRARY_PATH=../../../lib
GAMBCDIR=../../../lib ../../../gsc/gsc -:=../../.. $1.scm
gcc: fib.c: No such file or directory
gcc: fib_.c: No such file or directory
Command exited with non-zero status 1
0.00user 0.00system 0:00.01elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (153major+23minor)pagefaults 0swaps
ls: fib: No such file or directory
Running...
time: cannot run ./fib: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (24major+8minor)pagefaults 0swaps
[lucier@cohomology bench]$ cd sys/gambit
[lucier@cohomology gambit]$ ls
fib.scm
[lucier@cohomology gambit]$ env GAMBCDIR=../../../lib ../../../gsc/gsc
-:=../../.. fib.scm
Segmentation fault
[lucier@cohomology gambit]$ env GAMBCDIR=../../../lib gdb ../../../gsc/gsc
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) run -:=../../.. fib.scm
Starting program: /home/lucier/programs/gambc40b11/gsc/gsc -:=../../.. fib.scm
Program received signal SIGSEGV, Segmentation fault.
0x0815741b in ___H__20___front (___ps=0x8495ce0) at _front.c:7075
7075 ___SET_R2(___FIXMAX(___R3,___R2))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18548