🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Program causes failed assertion for g++ 1.27

#1448
From: "Douglas C. Schmidt"
Date: Mon, 26 Sep 1988 18:24
58 lines
2121 bytes
Hi,

  The following short program fragment causes a failed assertion for g++
  1.27 running on the Sparc.

----------------------------------------
#include <stream.h>
#include <ctype.h>
#include <Obstack.h>

#define NIL(TYPE) ((TYPE *)0)

class Word_Read : Obstack {
private:
   int   Length;
   char *Curr_Word;

public:
   Word_Read(int Default_Len = 80): (Default_Len), Length(0), Curr_Word(0) {
   // Make the default something reasonable, like 80 columns.
   }

   Obstack::free;  // Allow the derived type to inherit 
                   // only this member function.

   friend istream& operator>> (istream& s,Word_Read& Word) {
      char c;

      while (cin.good() && cin.get(c) && isspace(c)) {
         ;
      }

      do {
         if (isalnum(c)) {
            Word.Obstack::grow(c);
         }
         else if (isspace(c)) {
            Word.Length = Word.Obstack::size();
            Word.Curr_Word = (Word.Obstack::finish(0));
            return(s);
         }
      } while (cin.good() && cin.get(c));
      return(s);
   }
};
----------------------------------------

The diagnostic is:

----------------------------------------
g++ version 1.27.0
 /usr/public/lib/g++/gcc-cpp+ -v -I/cd/ua/schmidt/include/ -undef -D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix bug.cc /tmp/cca08687.cpp
GNU CPP version 1.27.0
 /usr/public/lib/g++/gcc-c++ /tmp/cca08687.cpp -quiet -dumpbase bug.cc -fchar-charconst -noreg -version -o /tmp/cca08687.s
Failed assertion (0) at line 981 of `convert.c'.
GNU C++ version 1.27.0 (sparc) compiled by GNU C version 1.28.
/usr/public/g++: Program c++ got fatal signal 6.
Technical Details
Message-ID: <8809261125.aa03980@PARIS.ICS.UCI.EDU>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!orion.cf.uci.edu!schmidt%siam.ics.uci.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!orion.cf.uci.edu!schmidt%siam.ics.uci.edu
From: schmidt%siam.ics.uci.edu@orion.cf.uci.edu ("Douglas C. Schmidt")
Newsgroups: gnu.g++.bug
Subject: Program causes failed assertion for g++ 1.27
Message-ID: <8809261125.aa03980@PARIS.ICS.UCI.EDU>
Date: 26 Sep 88 18:24:47 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 57