🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #505

possible GCC bug

#505
From: purtill
Date: Mon, 31 Jul 1989 21:16
32 lines
1961 bytes
	gcc version 1.35
	example: compiling "makedefs" in the NetHack v3 distribution.
I have the files needed bundled up in a shar file and I can send them
to you, but they amount to almost 200000 characters so I'll only send
them on request.
	invocation: add the line "CC=gcc -g" to the makefile provided with
NetHack, and replace the -O in CFLAGS with -traditional.  The problem
also occurs if it stays -O or if the -O is just removed.
	tm.h -> config/tm-sun3.h
	md -> config/m68k
	Machine: Sun 3/50.  
	Operating system: Sun UNIX 4.2 Release 3.5 (DISKLESS)
                                               ^^^ NOT 4.0!
	Behavior: Invoking "makedefs -p" in the src directory causes a
segmentation fault.

	I'm not sure this is a real bug.  However, when makedefs is
compiled with Sun's cc, there is no problem -- it works as it should
(no core-dump).  However, when I compile with gcc (even with the
-traditional flag), it gets a segmentation violation on line 305 of
makedef.c (according to GDB 3.2).  Since the code there looks
perfectly good, my guess is that there is a compiler bug or some very
obscure compiler dependency (in which case, please tell me what it is!)

	Note: The NetHack v3 distribution is available from
uunet.uu.net, in directory "comp.sources.games", via anonymous FTP.  I
found it in the "new" subdirectory.  Alternatively, I can send you
just those files that are needed in a shar format (c 200K).

^.-.^ Mark Purtill		purtill@math.mit.edu  (617)623-6238 - H
((")) Dept. of Math, MIT 2-229, Cambridge, MA  02139  (617)253-1589 - O
Technical Details
Message-ID: <8907312116.AA15186@zermelo.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!BOURBAKI.MIT.EDU!purtill

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!BOURBAKI.MIT.EDU!purtill
From: purtill@BOURBAKI.MIT.EDU
Newsgroups: gnu.gcc.bug
Subject: possible GCC bug
Message-ID: <8907312116.AA15186@zermelo.mit.edu>
Date: 31 Jul 89 21:16:18 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 32