This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/80212] New: [5/6/7 Regression] ICE: error: comdat-local function called by virtual
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Mar 2017 10:04:06 +0000
- Subject: [Bug ipa/80212] New: [5/6/7 Regression] ICE: error: comdat-local function called by virtual
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80212
Bug ID: 80212
Summary: [5/6/7 Regression] ICE: error: comdat-local function
called by virtual
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: hubicka at ucw dot cz
Target Milestone: ---
Starting from GCC 5.1.0, we ICE on:
$ cat /tmp/tmpy_z8ftoy.ii
struct b
{
virtual b *c () const;
};
struct d : virtual b
{
};
struct e : d
{
e *
c () const
{
}
};
main () { e a; }
$ g++ /tmp/tmpy_z8ftoy.ii -O2 --param
partial-inlining-entry-probability=403796683 -fno-early-inlining
/tmp/tmpy_z8ftoy.ii:15:16: error: comdat-local function called by virtual e*
e::_ZTch0_v0_n32_NK1e1cEv() const outside its comdat
main () { e a; }
^
*.LTHUNK0/1 (e* *.LTHUNK0() const) @0x7f873420d450
Type: function definition analyzed alias cpp_implicit_alias
Visibility: prevailing_def_ironly comdat_group:_ZNK1e1cEv
section:.text._ZNK1e1cEv (implicit_section) artificial
Same comdat group as: _ZNK1e1cEv/0
References: _ZNK1e1cEv/0 (alias)
Referring:
Availability: available
First run: 0
Function flags:
Called by: _ZTch0_v0_n32_NK1e1cEv.part.0/29 (1.00 per call) (can throw
external)
Calls:
/tmp/tmpy_z8ftoy.ii:15:16: internal compiler error: verify_cgraph_node failed
0x9eac71 cgraph_node::verify_node()
.././../gcc/cgraph.c:3490
0x9df794 symtab_node::verify()
.././../gcc/symtab.c:1183
0x9df86f symtab_node::verify_symtab_nodes()
.././../gcc/symtab.c:1203
0xc2b239 symtab_node::checking_verify_symtab_nodes()
.././../gcc/cgraph.h:616
0xc2b239 symbol_table::remove_unreachable_nodes(_IO_FILE*)
.././../gcc/ipa.c:698
0xd1c158 execute_todo
.././../gcc/passes.c:2030
Original test-case is:
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/inherit/covariant17.C
Adding -fno-partial-inlining can fix the problem.