egcs-970907: covariant return type + virtual inheritance = core
Jay Sachs
sachs@bull.cs.williams.edu
Mon Sep 8 15:35:00 GMT 1997
The attached program compiles & links fine, but dies with a bus error
at the line marked (*1*). Somewhat surprisingly, the value of the
pointer printed just before that line is the same as in line (*2*).
There is no problem if class B inherits non-virtually from A.
This is on a Sparc Ultra, SunOS 5.5.1.
-Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.cc
Type: text/x-c++
Size: 610 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19970908/bd2afcd4/attachment.bin>
More information about the Gcc-bugs
mailing list