🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1727

g++ 1.34.0 sparc bug

#1727
From: James Clark
Date: Sun, 12 Mar 1989 09:13
47 lines
1843 bytes
g++ 1.34.0 (test release of Mar 3) configured for the SPARC on a Sun 4/110
running Sun OS 4.0 generates code that incorrectly causes a bus error.

Script started on Sun Mar 12 09:00:33 1989
jclark% cat bug.c

struct foo {
	double x;
	foo();
};

foo::foo()
{
  x = 1.0;
}

static foo f;

main()
{
  exit(0);
}
jclark% g++ -g -v bug.c
g++ version 1.34.0
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ bug.c /tmp/cca03381.cpp
GNU CPP version 1.34
 /usr/local/lib/gcc-c++ /tmp/cca03381.cpp -quiet -dumpbase bug.c -g -version -o /tmp/cca03381.s
GNU C++ version 1.34.0 (sparc) compiled by GNU C version 1.34.
 as /tmp/cca03381.s -o bug.o
 /usr/local/lib/gcc-ld++ -C -e start -dc -dp /usr/local/lib/crt0+.o bug.o -lg++ /usr/local/lib/gcc-gnulib -lg -lc
jclark% a.out
Bus error (core dumped)
jclark% gdb a.out core
GDB 3.1, Copyright (C) 1988 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /u/jjc/groff/a.out...done.
Core file is from "a.out".
Program terminated with signal 10, Bus error.
Type "help" for a list of commands.
(gdb) frame
#0  0x2164 in foo ($this=(struct foo *) 0x6584) (bug.c line 9)
9	  x = 1.0;
(gdb) quit
jclark% exit
jclark% 
Technical Details
Message-ID: <8903120913.AA03422@jclark.uucp>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!jclark!jjc
From: mcvax!jclark!jjc@UUNET.UU.NET (James Clark)
Newsgroups: gnu.g++.bug
Subject: g++ 1.34.0 sparc bug
Message-ID: <8903120913.AA03422@jclark.uucp>
Date: 12 Mar 89 09:13:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 47