🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Another g++-2.3.3 internal error building libg++-2.3

#1390
From: bashford
Date: Mon, 11 Jan 1993 13:29
69 lines
2800 bytes
I have built gcc on the dec alpha using "configure --target=alpha-dec-osf1"
The compiler built and compiled itself.  It did not pass the stage3
stage2 comparison test, but this seems to be because the native assembler
puts strings in the object files giving the name of the /tmp/cc*.s files
which, of course, differ each time.

My machine identifies itself this way when I log in:
  DEC OSF/1 T1.2-1  (Rev. 12); Tue Jan 05 15:04:54 PST 1993
  DEC OSF/1 T1.2-1 Worksystem Software (Rev. 11)
and the arch command returns "alpha".

When I try to build libg++-2.3, I get an internal compiler error
on line 34 of libg++/src/AllocRing.cc.

I can reproduce the problem with the following smaller source file:
% cat bug2.cc 
class AllocRing 
{ 
 
  struct AllocQNode 
  { 
    void*  ptr; 
    int    sz; 
  }; 
 
  AllocQNode* nodes; 
  int         n; 
  int         current; 
 
  int         find(void* p); 
 
public: 
 
              AllocRing(int max); 
             ~AllocRing(); 
 
  void*       alloc(int size); 
  int         contains(void* ptr); 
  void        clear(); 
  void        free(void* p); 
}; 
 
 
AllocRing::AllocRing(int max) 
  :n(max), current(0), nodes(new AllocQNode[max]) 
{ 
  for (int i = 0; i < n; ++i) 
  { 
    nodes[i].ptr = 0; 
    nodes[i].sz = 0; 
  } 
} 

EOF
And here is the crash:

% gcc -v -O -c bug2.cc 
Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/specs 
gcc version 2.3.3 
 /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D__alpha -D__alpha__ -D___LONGLONG__ -D__SYSTYPE_BSD__ -D___SYSTYPE_BSD__ -D__unix -D__osf__ -D__alpha -D__alpha__ -D___LONGLONG -D__SYSTYPE_BSD -D___SYSTYPE_BSD -D__OPTIMIZE__ -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS bug2.cc /usr/local/lib/tmp/cc008760.i 
GNU CPP version 2.3.3 
 /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/cc1plus /usr/local/lib/tmp/cc008760.i -quiet -dumpbase bug2.cc -O -version -o /usr/local/lib/tmp/cc008760.s 
GNU C++ version 2.3.3 compiled by GNU C version 2.3.3. 
bug2.cc: In method `AllocRing::AllocRing (int)': 
bug2.cc:36: Internal compiler error. 
bug2.cc:36: Please report this to `bug-g++@prep.ai.mit.edu'. 
% 

If I leave out the -O flag, it does not crash.
Technical Details
Message-ID: <9301120529.AA20740@zippy.Scripps.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!scripps.edu!bashford

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!scripps.edu!bashford
From: bashford@scripps.edu
Subject: Another g++-2.3.3 internal error building libg++-2.3
Message-ID: <9301120529.AA20740@zippy.Scripps.EDU>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 11 Jan 1993 13:29:03 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 70