🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #373

Bug in gcc 2.1

#373
From: Frank Nobis
Date: Mon, 13 Apr 1992 05:17
65 lines
2753 bytes
I got a fatal compiler error from cc1plus.

This is the code wich produced the bug.

-----------------------------------------------------------------------------
// This may look like C code, but it is really -*- C++ -*-

class t {
  int	some_data;
public:
  typedef unsigned long ulong;
  t() { some_data = 0; };
  void some_function(void) { some_data++; };
};

int main()
{
  t	t1;

  t1.some_function();

  return (0);
}
------------------------------------------------------------------------------

This code will compile without errors if you move the typedef before
the definition of the class. But I think this it is legal to put a
typedef inside a class definiton.

This is the output from gcc.

Reading specs from /usr/local/lib/gcc-lib/i386sco/2.1/specs
gcc version 2.1
 /usr/local/lib/gcc-lib/i386sco/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dunix -Di386 -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -DSCO -DUSG -D__unix__ -D__i386__ -D__M_UNIX__ -D__M_I386__ -D__M_COFF__ -D__M_WORDSWAP__ -D__SCO__ -D__USG__ -D__unix -D__i386 -D__M_UNIX -D__M_I386 -D__M_COFF -D__M_WORDSWAP -D__SCO -D__USG bug.cc /usr/tmp/cca01420.i
GNU CPP version 2.1 (80386, ATT syntax)
 /usr/local/lib/gcc-lib/i386sco/2.1/cc1plus /usr/tmp/cca01420.i -quiet -dumpbase bug.cc -version -o /usr/tmp/cca01420.s
GNU C++ version 2.1 (80386, ATT syntax) compiled by GNU C version 2.1.
/usr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 10


I compiled gcc on SCO ODT 3.2 on a 80386 CPU without 80387
#!/bin/sh
# GCC was configured as follows:
./configure --gas i386sco

For the bootstrap gcc I used rcc as suggested without optimizer, but
with debug option.
For the stage1 and stage2 compiler I used 
CFLAGS="-O -g -B./stage{1,2}/"
I did not make any change to the source.

The comparison between the stage2 and stage3 compiler did not
differantiate.

I hope this may help you to fix this.


MfG
   Frank
-- 
 fn@trinity.do.open.de  oo   Unsere Sache ist ein Geheimnis in einem Geheimnis,
 +49 231 103640 Voice  _\/_  das Geheimnis von etwas, das verhuellt bleibt,
 4600 Dortmund 1,     /\__/\ ein Geheimnis, das nur ein anderes Geheimnis
 Grosse Heimstr. 50    /\/\  erklaeren kann, ein Geheimnis ueber ein Geheimnis,
                       \__/  Das sich mit einem Geheimnis befriedigt.
Technical Details
Message-ID: <9204130517.AA01491@trinity.do.open.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!trinity.do.open.DE!fn

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!trinity.do.open.DE!fn
From: fn@trinity.do.open.DE (Frank Nobis)
Subject: Bug in gcc 2.1
Message-ID: <9204130517.AA01491@trinity.do.open.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 13 Apr 1992 05:17:00 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 66