🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

compiler Seg V

#2089
From: Paul Vaughan
Date: Thu, 14 Dec 1989 22:24
27 lines
1423 bytes
The following source causes a Segmentation Violation in g++-1.36.2
(from the interviews:~ftp/pub/g++.ztar.Z on 12/12/89).
-----------------------------
class A {
public:
  A(int v) {value=v;}
  int value;
  static A& test;
};
A aaa = A(1);
A& A::test = aaa;

main() {
  A a(0);
  A& b=a.test; //lin 12
}
-----------------------------
g++ version 1.36.2 (based on GCC 1.36)
 /usr/local/gnu/1.36.2/lib/gcc-cpp -+ -v -DX11 -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -D__HAVE_68881__ -Dmc68020 sta1.cc /usr/tmp/cca23361.cpp
GNU CPP version 1.36
 /usr/local/gnu/1.36.2/lib/gcc-cc1plus /usr/tmp/cca23361.cpp -quiet -dumpbase sta1.cc -g -O -version -o /usr/tmp/cca23361.s
GNU C++ version 1.36.2 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
sta1.cc: In function int main ():
sta1.cc:12: Segmentation violation
g++-1.36.2: Program cc1plus got fatal signal 11.
Technical Details
Message-ID: <8912142224.AA23367@puma.cad.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!MCC.COM!vaughan%cadillac.cad.mcc.com

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!MCC.COM!vaughan%cadillac.cad.mcc.com
From: vaughan%cadillac.cad.mcc.com@MCC.COM (Paul Vaughan)
Newsgroups: gnu.g++.bug
Subject: compiler Seg V
Message-ID: <8912142224.AA23367@puma.cad.mcc.com>
Date: 14 Dec 89 22:24:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 27