https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124073
Bug ID: 124073
Summary: [16 Regression] ICE: in push_frame, at
analyzer/region-model.cc:6375 on C++ code
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 63646
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63646&action=edit
auto-reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -fanalyzer testcase.C
testcase.C: In function 'basic_string format(...)':
testcase.C:10:35: warning: no return statement in function returning non-void
[-Wreturn-type]
10 | auto format(...) -> basic_string {}
| ^
testcase.C: In member function
'MallocError()::<lambda()>::FMT_COMPILE_STRING::operator char_type()':
testcase.C:18:29: warning: no return statement in function returning non-void
[-Wreturn-type]
18 | operator char_type() {}
| ^
during IPA pass: analyzer
testcase.C: In function 'void MallocError()':
testcase.C:15:9: internal compiler error: in push_frame, at
analyzer/region-model.cc:6375
15 | format([] {
| ~~~~~~^~~~~
16 | using char_type = remove_cvref_t<decltype(0)>;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | struct FMT_COMPILE_STRING {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 | operator char_type() {}
| ~~~~~~~~~~~~~~~~~~~~~~~
19 | };
| ~~
20 | return FMT_COMPILE_STRING();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21 | });
| ~~
0x301a6bd internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xf220df fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0xa56fac ana::region_model::push_frame(function const&, gcall const*,
vec<ana::svalue const*, va_heap, vl_ptr> const*, ana::region_model_context*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:6375
0x1e94905 ana::region_model::update_for_gcall(gcall const&,
ana::region_model_context*, function*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:6210
0x1e44529 ana::interprocedural_call::update_model(ana::region_model*,
ana::exploded_edge const*, ana::region_model_context*) const
/repo/gcc-trunk/gcc/analyzer/engine.cc:1950
0x1e44529 ana::interprocedural_call::update_state(ana::program_state*,
ana::exploded_edge const*, ana::region_model_context*) const
/repo/gcc-trunk/gcc/analyzer/engine.cc:1942
0x1e6e135 ana::call_and_return_op::execute(ana::operation_context&) const
/repo/gcc-trunk/gcc/analyzer/ops.cc:844
0x1e4f76b ana::exploded_graph::process_node(ana::exploded_node*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:3780
0x1e4fdfa ana::exploded_graph::process_worklist()
/repo/gcc-trunk/gcc/analyzer/engine.cc:3409
0x1e5287b ana::impl_run_checkers(ana::logger*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:5269
0x1e536a6 ana::run_checkers()
/repo/gcc-trunk/gcc/analyzer/engine.cc:5360
0x1e44018 execute
/repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:81
/repo/gcc-trunk/binary-trunk-20260211175409-r16-7462-gb58cf254437aa7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/cc1plus
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260211175409-r16-7462-gb58cf254437aa7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/16.0.1/
-D_GNU_SOURCE testcase.C -quiet -dumpdir a- -dumpbase testcase.C -dumpbase-ext
.C -mtune=generic -march=x86-64 -fanalyzer -o /tmp/ccuzDMOl.s
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.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260211175409-r16-7462-gb58cf254437aa7-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/16.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260211175409-r16-7462-gb58cf254437aa7-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260211 (experimental) (GCC)