https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123226
Bug ID: 123226
Summary: ICE during inlining in verify_node, at cgraph.cc:4454
with -O3 -flto=32 -mcpu=neoverse-n1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: konstantinos.eleftheriou at vrull dot eu
Target Milestone: ---
Created attachment 63100
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63100&action=edit
Reduced test files
$ g++ -w -O3 -flto=32 -mcpu=neoverse-n1 CommandLine.ii opt.ii Pass.ii
PassRegistry.ii
In member function 'b',
inlined from 'enumerateWith' at PassRegistry.ii:34:9,
inlined from 'enumeratePasses' at Pass.ii:31:35,
inlined from 'ai' at opt.ii:36:30,
inlined from '__ct ' at opt.ii:27:39,
inlined from '__static_initialization_and_destruction_0' at opt.ii:41:23,
inlined from '_GLOBAL__sub_I_j' at opt.ii:41:24:
Pass.ii:26:35: error: missing indirect call in speculative call sequence
26 | void b(const int *) { findOption(0); }
| ^
Pass.ii:26:35: error: missing indirect call in speculative call sequence
Pass.ii:26:35: error: reference to dead statement
# .MEM = VDEF <.MEM>
D.23585 = OBJ_TYPE_REF(_2;(struct generic_parser_base)&MEM <struct n> [(void
*)&j + 16B]->3B) (&MEM <struct n> [(void *)&j + 16B]);
_ZN4llvm2cl19generic_parser_base10findOptionENS_9StringRefE.constprop.0/28
(findOption.constprop)
Type: function definition analyzed
Visibility: artificial
References: _ZThn8_N4llvm14PassNameParserD0Ev/3 (addr) (speculative) j/17
(read)
Referring:
Read from file: /tmp/ccsD0zJN.ltrans0.o
Function findOption.constprop/28 is inline copy in _GLOBAL__sub_I_j/15
Availability: local
Unit id: 2
Function flags: count:6950038029 (estimated locally) body local
only_called_at_startup executed_once
Called by: _GLOBAL__sub_I_j/15 (inlined) (8687547538 (estimated locally),8.09
per call)
Calls: __builtin_unreachable/67 (533484877182 (estimated locally),496.85 per
call) _ZN4llvmeqENS_9StringRefES0_/52 (701953785967 (estimated locally),653.75
per call) (can throw external
) _ZThn8_N4llvm14PassNameParserD0Ev/29 (speculative) (inlined) (168468908786
(estimated locally),156.90 per call) (can throw external)
during IPA pass: inline
Pass.ii:26:35: internal compiler error: verify_cgraph_node failed
0x213d393 internal_error(char const*, ...)
../../gcc/gcc/diagnostic-global-context.cc:787
0x90467b cgraph_node::verify_node()
../../gcc/gcc/cgraph.cc:4454
0x8f0957 symtab_node::verify()
../../gcc/gcc/symtab.cc:1377
0xf821a7 expand_call_inline
../../gcc/gcc/tree-inline.cc:4999
0xf853d7 gimple_expand_calls_inline
../../gcc/gcc/tree-inline.cc:5461
0xf853d7 optimize_inline_calls(tree_node*)
../../gcc/gcc/tree-inline.cc:5651
0xc02f0f inline_transform(cgraph_node*)
../../gcc/gcc/ipa-inline-transform.cc:865
0xda44fb execute_one_ipa_transform_pass
../../gcc/gcc/passes.cc:2333
0xda44fb execute_all_ipa_transforms(bool)
../../gcc/gcc/passes.cc:2397
0x909c4b cgraph_node::expand()
../../gcc/gcc/cgraphunit.cc:1862
0x909c4b cgraph_node::expand()
../../gcc/gcc/cgraphunit.cc:1822
0x90b9a7 expand_all_functions
../../gcc/gcc/cgraphunit.cc:2052
0x90b9a7 symbol_table::compile()
../../gcc/gcc/cgraphunit.cc:2430
0x832e9b lto_main()
../../gcc/gcc/lto/lto.cc:694
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [/tmp/ccun2u5A.mk:2: /tmp/ccsD0zJN.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
$ g++ -v
Using built-in specs.
COLLECT_GCC=/home/keleftheriou/gcc-master/install/usr/local/bin/g++
COLLECT_LTO_WRAPPER=/home/keleftheriou/gcc-master/install/usr/local/bin/../libexec/gcc/aarch64-unknown-linux-gnu/16.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc/configure --enable-shared --enable-checking=yes,extra
--with-system-zlib --enable-__cxa_atexit --enable-linker-build-id
--enable-plugin --with-isl --enable-lto --disable-nls --enable-languages=c,c++
--disable-bootstrap --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20251219 (experimental) (GCC)