[gnu.g++.bug] 2-line program that causes g++ to crash.

tommy@orc.olivetti.com (Tommy Joseph) (11/09/88)

Here is a 2-line rather meaningless program that caused g++
to crash.  I use a SUN 3/60 running Mach.

main()
{
    int c;
    void& b = void(c);
}

I put this into a file called try.cc and ran g++ as below:

% g++ -v try.cc
g++ version 1.27.0
 /usr/local/lib/gcc-cpp+ -v -undef -D__GNU__ -D__GNUG__ -Dmc68000 -DCMUCS -Dsun 
-Dunix try.cc /tmp/cc003075.cpp
GNU CPP version 1.27.0
 /usr/local/lib/gcc-c++ /tmp/cc003075.cpp -quiet -dumpbase try.cc -noreg -versio
n -o /tmp/cc003075.s
GNU C++ version 1.27.0 (68k, MIT syntax) compiled by GNU C version 1.27.

try.cc:4: Segmentation violation
g++: Program c++ got fatal signal 11.