egcs-970907: covariant return type + virtual inheritance = core
Jay Sachs
sachs@bull.cs.williams.edu
Mon Sep 8 15:58: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.
I should add that it doesn't matter whether it's compiled with or
without -frtti.
-jay
More information about the Gcc-bugs
mailing list