https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125298
Bug ID: 125298
Summary: [17 Regression] ICE: in set, at value-range.cc:870
with -fanalyzer -ffast-math and _Atomic double
Product: gcc
Version: 17.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 64451
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64451&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -fanalyzer -ffast-math testcase.c
during IPA pass: analyzer
testcase.c: In function 'foo':
testcase.c:7:5: internal compiler error: in set, at value-range.cc:870
7 | i /= d;
| ^~
0x2cf0e3d internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe3768f fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x9408c3 frange::set(tree_node*, real_value const&, real_value const&,
nan_state const&, value_range_kind)
/repo/gcc-trunk/gcc/value-range.cc:870
0x1a18b03 frange::set(tree_node*, real_value const&, real_value const&,
value_range_kind)
/repo/gcc-trunk/gcc/value-range.cc:932
0x1a18b03 frange::set(tree_node*, tree_node*, value_range_kind)
/repo/gcc-trunk/gcc/value-range.cc:938
0x1bab4b2 value_range::value_range(tree_node*, tree_node*, value_range_kind)
/repo/gcc-trunk/gcc/value-range.h:877
0x1bab4b2 ana::constant_svalue::maybe_get_value_range_1(value_range&) const
/repo/gcc-trunk/gcc/analyzer/svalue.cc:1221
0x1b3891f ana::svalue::maybe_get_value_range(value_range&) const
/repo/gcc-trunk/gcc/analyzer/svalue.h:198
0x1b3891f ana::region_model::get_gassign_result(gassign const*,
ana::region_model_context*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:1319
0x1b3b9cc ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:1620
0x1b17d6e ana::gimple_stmt_op::execute_on_state(ana::operation_context&,
ana::program_state) const
/repo/gcc-trunk/gcc/analyzer/ops.cc:446
0x1b18155 ana::gimple_stmt_op::execute(ana::operation_context&) const
/repo/gcc-trunk/gcc/analyzer/ops.cc:417
0x1af702b ana::exploded_graph::process_node(ana::exploded_node*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:3521
0x1af76ba ana::exploded_graph::process_worklist()
/repo/gcc-trunk/gcc/analyzer/engine.cc:3150
0x1af9fdb ana::impl_run_checkers(ana::logger*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:4848
0x1afae06 ana::run_checkers()
/repo/gcc-trunk/gcc/analyzer/engine.cc:4939
0x1aec408 execute
/repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:81
/repo/gcc-trunk/binary-trunk-20260512192850-r17-474-g2502a459db5959-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260512192850-r17-474-g2502a459db5959-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -fanalyzer -ffast-math -o /tmp/ccK1ErCn.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-20260512192850-r17-474-g2502a459db5959-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/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-20260512192850-r17-474-g2502a459db5959-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260512 (experimental) (GCC)