Article View: gnu.g++.bug
Article #1769Signal 6 on duplicate class
From: chatty%FRLRI61.BITNET
Date: Tue, 21 Mar 1989 14:22
Date: Tue, 21 Mar 1989 14:22
52 lines
2186 bytes
2186 bytes
Our g++ 1.33 gets signal 6 on Sun 3, Sun 4, and HP when it encounters some kind
of redefined classes. Here is the minimum code we found to trigger the bug :
class STRING {
public :
STRING (char*);
STRING (int);
STRING (STRING&);
};
class STRING {
public :
STRING (char*);
STRING (int); // no error at all when suppressed
};
hp2-> g++ -v -c String.cc
g++ version 1.33.0
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dhp9000s200
-Dhp9000s300 -DPWB -Dmc68k -Dhpux -Dunix -D__hp9000s200__ -D__hp9000s300__
-D__PWB__ -D__mc68k__ -D__hpux__ -D__unix__ -D__HAVE_68881__ -D__HPUX_ASM__
String.cc /tmp/cca09066.cpp
GNU CPP version 1.34
/usr/local/lib/gcc-c++ /tmp/cca09066.cpp -quiet -dumpbase String.cc -noreg
-version -o /tmp/cca09066.s
GNU C++ version 1.33.0 (68k, SGS/hpux syntax) compiled by GNU C version 1.34.
Failed assertion t != op2 at line 766 of `tree.c'.
g++: Program c++ got fatal signal 6.
The message is slightly different when cross-compiling on a Sparc :
g++ -v String.cc
g++ version 1.33.0
/usr/local/lib/gcc68k/cpp -+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -Dsun
-Dunix -D__mc68000__ -D__sun__ -D__unix__ -Dmc68020 String.cc /tmp/cca01645.cpp
GNU CPP version 1.33
/usr/local/lib/gcc68k/c++ /tmp/cca01645.cpp -quiet -dumpbase String.cc
-noreg -version -o /tmp/cca01645.s
GNU C++ version 1.33.0 (68k, MIT syntax) compiled by CC.
Failed assertion at __LINE__ 766 of `tree.c'.
g++: Program c++ got fatal signal 6.
While trying to reduce that code, we discovered that g++ finds no error
when the second constructor of the second class is not there.
Hope that will help ...
Yves Berteaud yb@lri.lri.fr
Stephane Chatty chatty@lri.lri.fr
Technical Details
Message-ID:
<8903211422.AA13238@sun6.lri.fr>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CUNYVM.CUNY.EDU!chatty%FRLRI61.BITNETShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!CUNYVM.CUNY.EDU!chatty%FRLRI61.BITNET From: chatty%FRLRI61.BITNET@CUNYVM.CUNY.EDU Newsgroups: gnu.g++.bug Subject: Signal 6 on duplicate class Message-ID: <8903211422.AA13238@sun6.lri.fr> Date: 21 Mar 89 14:22:45 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 52