🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Segmentation fault in G++ 1.36.1

#642
From: Larry Ketcham
Date: Wed, 29 Nov 1989 22:25
37 lines
1700 bytes
Is a fix available for this problem?

The following program fragment gets a segmentation fault in G++ 1.36.1:

------------------test_const.cc------------------------------------------
struct A
  { 
    int a;
    A(int new_a) { }
  };

struct B
  { 
    A A_item;
    B()
      { 
	A_item = A(0);    // this line bombs GNU C++
      };
  };
-------------------------------------------------------------------------

-------------------------------------------------------------------------
g++-new -v test_const.cc
gcc version 1.36.1m1 (based on GCC 1.36)
 /usr/local/src/lib/sun3/g++-1.36.1m1/gcc-cpp -+ -v -undef -D__GNUC__ 
-D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__
-D__unix__ -D__HAVE_68881__ -Dmc68020 test_const.cc /usr/tmp/cca20399.cpp
GNU CPP version 1.36
 /usr/local/src/lib/sun3/g++-1.36.1m1/gcc-cc1plus /usr/tmp/cca20399.cpp 
-quiet -dumpbase test_const.cc -version -o /usr/tmp/cca20399.s
GNU C++ version 1.36.1m1 (based on GCC 1.36) (68k, MIT syntax) compiled 
 by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
test_const.cc: In method B::B ():
test_const.cc:12: Segmentation violation
g++-new: Program cc1plus got fatal signal 11.
-------------------------------------------------------------------------
Technical Details
Message-ID: <8911292225.AA20416@pasillo.aca.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!lk

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!lk
From: lk@MCC.COM (Larry Ketcham)
Newsgroups: gnu.g++.bug
Subject: Segmentation fault in G++ 1.36.1
Message-ID: <8911292225.AA20416@pasillo.aca.mcc.com>
Date: 29 Nov 89 22:25:25 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 37