🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

g++-2.2.2 gets fatal signal 11

#134
From: pierrest
Date: Thu, 30 Jul 1992 20:25
67 lines
2427 bytes
g++ get a fatal signal 11 when I try to use a constructor in an anonymous manner
This bug seems not to be system dependent.

The following are the compilation result and the file fred.h & fred.cc
which make g++ to crash.

bronze310% g++ -v  fred.cc -o fred
Reading specs from /usr/triton/lib/gcc-lib/rs6000/2.2.2/specs
gcc version 2.2.2
 /usr/triton/lib/gcc-lib/rs6000/2.2.2/cpp -lang-c++ -v -I/usr/triton/lib/g++-inc
lude -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D_IBMR2 -D_AIX -D___IBMR2__
 -D___AIX__ -D___IBMR2 -D___AIX -D__CHAR_UNSIGNED__ fred.cc /tmp/ccPXsBXj.i
GNU CPP version 2.2.2
 /usr/triton/lib/gcc-lib/rs6000/2.2.2/cc1plus /tmp/ccPXsBXj.i -quiet -dumpbase f
red.cc -version -o /tmp/ccPXsBXj.s
GNU C++ version 2.2.2 compiled by GNU C version 2.2.2.
/usr/triton/bin/gcc: Internal compiler error: program cc1plus got fatal signal 1
1


************************** fred.h *********************************
#include <stdio.h>

struct GBox
{
    int min;

    GBox () {}
    GBox (int xm)
	{ min = xm;}

};


class GRegion
{
  public:
    GRegion(){};
    GRegion(const GBox& box){ printf("%d\n", box.min);};
};

extern const GRegion gBiggestRegion;



*************************** fred.cc *****************************
#include "fred.cc"
/*
const GBox mybox(4);
const GRegion gBiggestRegion(mybox); <------------ this works!!!
*/
const GRegion gBiggestRegion(GBox(4));
                               ^
                               |
                               |
                               +---- here is the bug: g++-2.2.2 doesn't deal
                                     with anonymous use of constructors
main()
{
printf( "%d\n", &gBiggestRegion);
printf("%d\n", sizeof(gBiggestRegion));
}

 ------- Frederic Pierresteguy -----  Bull S.A France ---------------------    
 Software Eng. Methodology     ! e-mail: F.Pierresteguy@frcl.bull.fr
 Rue Jean-Jaures F60D07, BP 53 ! tel:(33-1) 3080 6393
 78340 Les Clayes-Sous-Bois    ! Fax:(33-1) 3080 7078
Technical Details
Message-ID: <9207301625.AA13573@agate.frcl.bull.fr>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!clbull.FRcl.bull.FR!pierrest

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!clbull.FRcl.bull.FR!pierrest
From: pierrest@clbull.FRcl.bull.FR
Subject: g++-2.2.2 gets fatal signal 11
Message-ID: <9207301625.AA13573@agate.frcl.bull.fr>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 30 Jul 1992 20:25:54 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 68