This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70018] [4.9/5/6 Regression] Possible issue around IPO and C++ comdats discovered as pure/const
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Apr 2016 23:05:48 +0000
- Subject: [Bug c++/70018] [4.9/5/6 Regression] Possible issue around IPO and C++ comdats discovered as pure/const
- Auto-submitted: auto-generated
- References: <bug-70018-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70018
--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Created attachment 38195
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38195&action=edit
Patch I am testing
This patch handles const->pure transition for all functions detected const that
are not necessarily binding to current def. I think this is best we can do
without tracking down constness from the FE (i.e. before the folding).
The patch tries to be careful to optimize some cases (such as take into account
that inlined functions will bind locally).
I will try to collect some data on code quality effect.