ojr@itk.unit.no (01/11/90)
The following program causes a segment viaolation when compiled. I
think it is about as small as it can be.
Configuration: sun3-os4 and sun4-os4, g++ 1.36.1
------------------------------
class C {
public:
C(int j);
virtual ~C();
};
class B : public C {
public:
~A() {}
A();
};
B A(3.0);
--------------------------------
g++ -c -v d2.cc
gcc version 1.36.1 (based on GCC 1.36)
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 d2.cc /usr/tmp/cca16716.cpp
GNU CPP version 1.36
/usr/local/lib/gcc-cc1plus /usr/tmp/cca16716.cpp -quiet -dumpbase d2.cc -version -o /usr/tmp/cca16716.s
GNU C++ version 1.36.1 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
d2.cc:9: destructor `A' must match class name
d2.cc: In function void _GLOBAL_$D$d2_cc ():
d2.cc:13: Segmentation violation
g++: Program cc1plus got fatal signal 11.
----------------------------------------
Thank you for an otherwise very good compiler ....
Ornulf Jan Rodseth M.Sc. Telephone
SINTEF Dep. of Automatic Control (+47 7) 594351 Direct
N-7034 TRONDHEIM (+47 7) 594375 Switchboard
NORWAY (+47 7) 594399 Fax
ojr%regtek.unit.uninett@tor.nta.no (EAN) ojr@itk.unit.no (ARPA)