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:52:13 +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
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, what happens is that
#0 set_const_flag_1 (node=<cgraph_node* 0x7ffff173b000 "_GLOBAL__sub_I_A">,
set_const=true, looping=false, changed=0x7fffffffdd5f)
at ../../gcc/cgraph.c:2469
#1 0x0000000000ba53ef in cgraph_node::set_const_flag (this=<cgraph_node*
0x7ffff173b000 "_GLOBAL__sub_I_A">, set_const=true, looping=false)
at ../../gcc/cgraph.c:2575
#2 0x0000000001b25d6b in propagate_pure_const () at
../../gcc/ipa-pure-const.c:1499
#3 0x0000000001b26355 in (anonymous namespace)::pass_ipa_pure_const::execute
(this=0x29b9650) at ../../gcc/ipa-pure-const.c:1678
clears DECL_STATIC_CONSTRUCTOR flag on a artificial static ctor
_GLOBAL__sub_I_A,
because the ctor isn't actually needed.
And then we hit:
tree *val = map.get (symbol);
/* A NULL here means that SYMBOL is unreachable in the definition
of ipa-comdats. Either ipa-comdats is wrong about this or someone
forgot to cleanup and remove unreachable functions earlier. */
gcc_assert (val);
clearly it is the second case, "someone forgot to cleanup and remove
unreachable functions earlier".