This is the mail archive of the
mailing list for the GCC project.
Devirtualization causing undefined symbol references at link?
- From: Steven Noonan <steven at uplinklabs dot net>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 16 Nov 2015 14:18:29 -0800
- Subject: Devirtualization causing undefined symbol references at link?
- Authentication-results: sourceware.org; auth=none
(I'm not subscribed to the list, so please CC me on all responses.)
This is using GCC 5.2 on Linux x86_64. On a project at work I've found
that one of our shared libraries refuses to link because of some
symbol references it shouldn't be making. If I add "-fno-devirtualize
-fno-devirtualize-speculatively" to the compile flags, the issue goes
away and everything links/runs fine. The issue does *not* appear on
GCC 4.8 (which is used by our current production toolchain).
First of all, does anyone have any ideas off the top of their head why
devirtualization would break like this?
Second, I'm looking for any ideas on how to gather meaningful data to
submit a useful bug report for this issue. The best idea I've come up
with so far is to preprocess one of the sources with the incorrect
references and use 'delta' to reduce it to a minimal preprocessed
source file that references one of these incorrect symbols.
Unfortunately this is a sluggish process because such a minimal test
case would need to compile correctly to an object file -- so "delta"
is reducing it very slowly. So far I'm down from 11MB preprocessed
source to 1.1MB preprocessed source after running delta a few times.