https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89693
Bug ID: 89693 Summary: [9 Regression] ICE: verify_cgraph_node failed (error: edge points to wrong declaration) Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-checking, ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: marxin at gcc dot gnu.org Target Milestone: --- g++-9.0.0-alpha20190310 snapshot (r269561) ICEs when compiling gcc/testsuite/g++.dg/abi/covariant5.C w/ -O3 (-Ofast) -fno-ipa-icf-functions: % g++-9.0.0-alpha20190310 -O3 -fno-ipa-icf-functions -c gcc/testsuite/g++.dg/abi/covariant5.C gcc/testsuite/g++.dg/abi/covariant5.C:52:1: error: edge points to wrong declaration: 52 | } | ^ <function_decl 0x7fbf10e59100 _ZTch0_h8_N1C3TwoEv.constprop type <function_type 0x7fbf10e40f18 type <pointer_type 0x7fbf10e1cdc8 type <record_type 0x7fbf10e1cc78 C> public unsigned DI size <integer_cst 0x7fbf10cb0e28 constant 64> unit-size <integer_cst 0x7fbf10cb0e40 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fbf10e1cdc8> QI size <integer_cst 0x7fbf10cb0f18 constant 8> unit-size <integer_cst 0x7fbf10cb0f30 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fbf10e40f18 arg-types <tree_list 0x7fbf10cc4870 value <void_type 0x7fbf10ccef18 void>>> readonly addressable used nothrow decl_5 QI gcc/testsuite/g++.dg/abi/covariant5.C:21:14 align:8 warn_if_not_align:0 context <record_type 0x7fbf10e1cc78 C>> Instead of: <function_decl 0x7fbf10e0c900 _ZTchn8_h8_N1C3TwoEv type <method_type 0x7fbf10e1cf18 type <pointer_type 0x7fbf10e1cdc8 type <record_type 0x7fbf10e1cc78 C> public unsigned DI size <integer_cst 0x7fbf10cb0e28 constant 64> unit-size <integer_cst 0x7fbf10cb0e40 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fbf10e1cdc8> QI size <integer_cst 0x7fbf10cb0f18 constant 8> unit-size <integer_cst 0x7fbf10cb0f30 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fbf10e1cf18 method basetype <record_type 0x7fbf10e1cc78 C> arg-types <tree_list 0x7fbf10e094d8 value <pointer_type 0x7fbf10e1cdc8> chain <tree_list 0x7fbf10cc4870 value <void_type 0x7fbf10ccef18 void>>> pointer_to_this <pointer_type 0x7fbf10e1f7e0>> readonly addressable asm_written used nothrow public virtual decl_5 QI gcc/testsuite/g++.dg/abi/covariant5.C:21:14 align:8 warn_if_not_align:0 context <record_type 0x7fbf10e1cc78 C> full-name "virtual C* C::_ZTchn8_h8_N1C3TwoEv()" > main/24 (int main()) @0x7fbf10e375a0 Type: function definition analyzed Visibility: externally_visible public References: Referring: Availability: available Function flags: count:1073741824 (estimated locally) body only_called_at_startup executed_once Called by: Calls: virtual C& C::_ZTchn8_h8_N1C5ThreeEv()/12 (487586162 (estimated locally),0.45 per call) _ZTch0_h8_N1C3TwoEv.constprop/41 (1073741824 (estimated locally),1.00 per call) during IPA pass: cp gcc/testsuite/g++.dg/abi/covariant5.C:52:1: internal compiler error: verify_cgraph_node failed 0xb7573c cgraph_node::verify_node() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/cgraph.c:3444 0xb696bc symtab_node::verify() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/symtab.c:1225 0xb69797 symtab_node::verify_symtab_nodes() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/symtab.c:1245 0xdc6997 symtab_node::checking_verify_symtab_nodes() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/cgraph.h:637 0xdc6997 symbol_table::remove_unreachable_nodes(_IO_FILE*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/ipa.c:667 0xeb8969 execute_todo /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20190310/work/gcc-9-20190310/gcc/passes.c:2045