This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/58585] [4.9 Regression] ICE in ipa with virtual inheritance


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58585

--- Comment #19 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fix for PR58252 and PR59226 fixed first two problems contributing to the ICE on
the testcase.  The last remaining problem is that our type inheritance graph is
incomplete, it misses the class C.

The reason is that I build the graph by looking for virtual methods and adding
their types.  C has no virtual methods per se, but it does use thunk of A's
constructor. This thunk is considered, but it does not have type of C that I
think is a frontend bug.

The patch I attached fixes it by considering also non-virtual methods to build
the graph. This matches the constructor of C and gets testcase working, but I
think it is symptomatic fix and may break if ctor is optimized out with LTO.
I am looking into a safer way to discover existence of C.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]