This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47316] devirtualize calls to virtual methods that are never further overriden
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jan 2011 06:48:52 +0000
- Subject: [Bug tree-optimization/47316] devirtualize calls to virtual methods that are never further overriden
- Auto-submitted: auto-generated
- References: <bug-47316-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47316
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-17 06:48:50 UTC ---
Actually better solution would be function and type attributes, hinting the
function is never overriden.
The automatic analysis wouldn't work in cases like:
std::vector<A *> vec;
if there are any library calls inside std::vector.
Attributes would also work in non-whole-program mode.
I am sorry for not thinking it through - or rather forgetting the issues it had
and opening this PR so enthusiastically.