This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/77905] [5/6/7 Regression] ICE at -Os and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in ipa_comdats, at ipa-comdats.c:352)
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Dec 2016 10:59:08 +0000
- Subject: [Bug ipa/77905] [5/6/7 Regression] ICE at -Os and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in ipa_comdats, at ipa-comdats.c:352)
- Auto-submitted: auto-generated
- References: <bug-77905-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77905
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 40309
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40309&action=edit
gcc7-pr77905.patch
Untested fix. The problem is that during local pure/const pass, it is
determined to be const, but looping, so DECL_STATIC_CONSTRUCTOR is not removed
from it. Only during the ipa pure/const pass it is determined not looping,
which removes DECL_STATIC_CONSTRUCTOR, but has_cdtor is not set because it is
already const (but looping), so we don't do TODO_remove_functions.