https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88235
Bug ID: 88235 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-alpha20181125 snapshot (r266441) ICEs when compiling gcc/testsuite/g++.old-deja/g++.mike/misc13.C w/ -O1 (-O2, -O3, -Ofast, -Og) -fdevirtualize -finline-small-functions -fipa-cp -fipa-cp-clone --param ipa-cp-eval-threshold=125 --param max-inline-insns-single=4: % g++-9.0.0-alpha20181125 -O1 -fdevirtualize -finline-small-functions -fipa-cp -fipa-cp-clone --param ipa-cp-eval-threshold=125 --param max-inline-insns-single=4 -c gcc/testsuite/g++.old-deja/g++.mike/misc13.C -o /dev/null gcc/testsuite/g++.old-deja/g++.mike/misc13.C:54:1: error: edge points to wrong declaration: 54 | } | ^ <function_decl 0x7ff52e498e00 event.constprop type <function_type 0x7ff52e4810a8 type <void_type 0x7ff52e2f3f18 void VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ff52e2f3f18 pointer_to_this <pointer_type 0x7ff52e2fb000>> QI size <integer_cst 0x7ff52e2d5f00 constant 8> unit-size <integer_cst 0x7ff52e2d5f18 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ff52e4810a8 arg-types <tree_list 0x7ff52e2e9848 value <void_type 0x7ff52e2f3f18 void>>> addressable used nothrow static autoinline decl_5 QI defer-output gcc/testsuite/g++.old-deja/g++.mike/misc13.C:29:16 align:16 warn_if_not_align:0 context <record_type 0x7ff52e44e7e0 ItemView>> Instead of: <function_decl 0x7ff52e457100 _ZThn8_N8ItemView5eventEv type <method_type 0x7ff52e44e9d8 type <void_type 0x7ff52e2f3f18 void VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ff52e2f3f18 pointer_to_this <pointer_type 0x7ff52e2fb000>> QI size <integer_cst 0x7ff52e2d5f00 constant 8> unit-size <integer_cst 0x7ff52e2d5f18 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ff52e44e9d8 method basetype <record_type 0x7ff52e44e7e0 ItemView> arg-types <tree_list 0x7ff52e451578 value <pointer_type 0x7ff52e44ea80> chain <tree_list 0x7ff52e2e9848 value <void_type 0x7ff52e2f3f18 void>>> pointer_to_this <pointer_type 0x7ff52e456150>> addressable used public ignored weak virtual decl_5 QI gcc/testsuite/g++.old-deja/g++.mike/misc13.C:29:16 align:8 warn_if_not_align:0 context <record_type 0x7ff52e44e7e0 ItemView> initial <block 0x7ff52e497cc0> result <result_decl 0x7ff52e450e88 D.2643 type <void_type 0x7ff52e2f3f18 void> ignored VOID gcc/testsuite/g++.old-deja/g++.mike/misc13.C:54:1 align:8 warn_if_not_align:0 context <function_decl 0x7ff52e457100 _ZThn8_N8ItemView5eventEv>> full-name "virtual void ItemView::_ZThn8_N8ItemView5eventEv()" arguments <parm_decl 0x7ff52e453900 this type <pointer_type 0x7ff52e44eb28 type <record_type 0x7ff52e44e7e0 ItemView> readonly unsigned DI size <integer_cst 0x7ff52e2d5e10 constant 64> unit-size <integer_cst 0x7ff52e2d5e28 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ff52e44eb28> readonly unsigned read DI gcc/testsuite/g++.old-deja/g++.mike/misc13.C:29:23 size <integer_cst 0x7ff52e2d5e10 64> unit-size <integer_cst 0x7ff52e2d5e28 8> align:64 warn_if_not_align:0 context <function_decl 0x7ff52e457100 _ZThn8_N8ItemView5eventEv> arg-type <pointer_type 0x7ff52e44eb28>> struct-function 0x7ff52e467a50> main/34 (int main()) @0x7ff52e46d000 Type: function definition analyzed Visibility: externally_visible public References: want/0 (write)a/31 (addr)want/0 (write)a/31 (addr)errs/1 (read) Referring: Availability: available Function flags: count:1073741824 (estimated locally) body only_called_at_startup executed_once Called by: Calls: int __builtin_puts(const char*)/62 (708669605 (estimated locally),0.66 per call) (can throw external) int __builtin_puts(const char*)/62 (365072220 (estimated locally),0.34 per call) (can throw external) event.constprop/75 (1073741824 (estimated locally),1.00 per call) (can throw external) request.constprop/76 (1073741824 (estimated locally),1.00 per call) during IPA pass: inline gcc/testsuite/g++.old-deja/g++.mike/misc13.C:54:1: internal compiler error: verify_cgraph_node failed 0xb072fc cgraph_node::verify_node() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cgraph.c:3430 0xafb5cc symtab_node::verify() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/symtab.c:1218 0xafb6a7 symtab_node::verify_symtab_nodes() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/symtab.c:1238 0xd4109b symtab_node::checking_verify_symtab_nodes() /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/cgraph.h:633 0xd4109b symbol_table::remove_unreachable_nodes(_IO_FILE*) /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/ipa.c:673 0x1769ddc ipa_inline /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/ipa-inline.c:2529 0x1769ddc execute /var/tmp/portage/sys-devel/gcc-9.0.0_alpha20181125/work/gcc-9-20181125/gcc/ipa-inline.c:2930