lk@MCC.COM (Larry Ketcham) (11/30/89)
Is a fix available for this problem?
The following program fragment gets a segmentation fault in G++ 1.36.1:
------------------test_const.cc------------------------------------------
struct A
{
int a;
A(int new_a) { }
};
struct B
{
A A_item;
B()
{
A_item = A(0); // this line bombs GNU C++
};
};
-------------------------------------------------------------------------
-------------------------------------------------------------------------
g++-new -v test_const.cc
gcc version 1.36.1m1 (based on GCC 1.36)
/usr/local/src/lib/sun3/g++-1.36.1m1/gcc-cpp -+ -v -undef -D__GNUC__
-D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__
-D__unix__ -D__HAVE_68881__ -Dmc68020 test_const.cc /usr/tmp/cca20399.cpp
GNU CPP version 1.36
/usr/local/src/lib/sun3/g++-1.36.1m1/gcc-cc1plus /usr/tmp/cca20399.cpp
-quiet -dumpbase test_const.cc -version -o /usr/tmp/cca20399.s
GNU C++ version 1.36.1m1 (based on GCC 1.36) (68k, MIT syntax) compiled
by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
test_const.cc: In method B::B ():
test_const.cc:12: Segmentation violation
g++-new: Program cc1plus got fatal signal 11.
-------------------------------------------------------------------------