https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117429
Bug ID: 117429
Summary: ICE: verify_cgraph_node failed during IPA pass: inline
with -O2 and -fsanitize=bool
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: iamanonymous.cs at gmail dot com
Target Milestone: ---
*******************************************************************************
OS and Platform:
$ uname -a:
Linux 65dac7c84719 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC
2023 x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/home/software/gcc-trunk-3aa004f/bin/gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk-3aa004f/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk-3aa004f
--enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240630 (experimental) (GCC)
*******************************************************************************
Program:
$ cat mutant.C
struct a {
int *b;
long c;
a() {
if (c)
b = static_cast<int *>(operator new(sizeof(int)));
}
};
void __attribute__((no_sanitize("bool"))) __attribute__((flatten)) d() { a(); }
*******************************************************************************
Command Lines:
$ gcc -O2 -fsanitize=bool mutant.C
mutant.C:9:79: error: calls_comdat_local is set outside of a comdat group
9 | void __attribute__((no_sanitize("bool"))) __attribute__((flatten)) d()
{ a(); }
|
^
mutant.C:9:79: error: invalid calls_comdat_local flag
_Z1dv/3 (void d())
Type: function definition analyzed
Visibility: externally_visible semantic_interposition public
References:
Referring:
Availability: available
Function flags: count:1073741824 (estimated locally) body calls_comdat_local
Called by:
Calls: _ZN1aC2Ev/1 (inlined) (1073741824 (estimated locally),1.00 per call)
(can throw external)
during IPA pass: inline
mutant.C:9:79: internal compiler error: verify_cgraph_node failed
0x576c1eb diagnostic_context::report_diagnostic(diagnostic_info*)
???:0
0x576cabd diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1],
diagnostic_t)
???:0
0x578c98b internal_error(char const*, ...)
???:0
0x193958c cgraph_node::verify_node()
???:0
0x190b890 symtab_node::verify()
???:0
0x190bfa6 symtab_node::verify_symtab_nodes()
???:0
0x1955ec2 symtab_node::checking_verify_symtab_nodes()
???:0
0x2050421 symbol_table::remove_unreachable_nodes(_IO_FILE*)
???:0
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.
Godbolt link: https://godbolt.org/z/rT49bsnej