https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127605
Bug ID: 127605
Summary: [17 Regression] during GIMPLE pass: ccp ICE: in
decompose, at wide-int.h:1049 -Og -mavx512f
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned 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 65684
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65684&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -mavx512f testcase.c
during GIMPLE pass: ccp
testcase.c: In function 'foo':
testcase.c:4:1: internal compiler error: in decompose, at wide-int.h:1049
4 | foo(V v)
| ^~~
0x2c6521d internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xcb5d97 fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1813
0x9b606a wi::int_traits<generic_wide_int<wide_int_ref_storage<false, false> >
>::decompose(long*, unsigned int, generic_wide_int<wide_int_ref_storage<false,
false> > const&)
/repo/gcc-trunk/gcc/wide-int.h:1049
0x1d2d4d4 wi::int_traits<generic_wide_int<wide_int_ref_storage<false, false> >
>::decompose(long*, unsigned int, generic_wide_int<wide_int_ref_storage<false,
false> > const&)
/repo/gcc-trunk/gcc/wide-int.h:2326
0x1d2d4d4 wide_int_ref_storage<false,
false>::wide_int_ref_storage<generic_wide_int<wide_int_ref_storage<false,
false> > >(generic_wide_int<wide_int_ref_storage<false, false> > const&,
unsigned int)
/repo/gcc-trunk/gcc/wide-int.h:1099
0x1d2d4d4 generic_wide_int<wide_int_ref_storage<false, false>
>::generic_wide_int<generic_wide_int<wide_int_ref_storage<false, false> >
>(generic_wide_int<wide_int_ref_storage<false, false> > const&, unsigned int)
/repo/gcc-trunk/gcc/wide-int.h:855
0x1d2d4d4 bool wi::ltu_p<generic_wide_int<wide_int_ref_storage<false, false> >,
generic_wide_int<wide_int_ref_storage<false, false> >
>(generic_wide_int<wide_int_ref_storage<false, false> > const&,
generic_wide_int<wide_int_ref_storage<false, false> > const&)
/repo/gcc-trunk/gcc/wide-int.h:2330
0x1cccc64 bool wi::leu_p<generic_wide_int<wide_int_ref_storage<false, false> >,
generic_wide_int<wide_int_ref_storage<false, false> >
>(generic_wide_int<wide_int_ref_storage<false, false> > const&,
generic_wide_int<wide_int_ref_storage<false, false> > const&)
/repo/gcc-trunk/gcc/wide-int.h:2372
0x1cccc64 gimple_simplify_LSHIFT_EXPR(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*)
/repo/build-gcc-trunk-amd64/gcc/gimple-match-3.cc:26288
0x2053b9d gimple_resimplify2
/repo/gcc-trunk/gcc/gimple-match-exports.cc:1029
0x1ccb9fd gimple_simplify_LSHIFT_EXPR(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*)
/repo/build-gcc-trunk-amd64/gcc/gimple-match-3.cc:27464
0x2053b9d gimple_resimplify2
/repo/gcc-trunk/gcc/gimple-match-exports.cc:1029
0x205443e gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
/repo/gcc-trunk/gcc/gimple-match-exports.cc:896
0x10a2d25 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
/repo/gcc-trunk/gcc/gimple-fold.cc:9699
0x1637061 ccp_fold
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:1311
0x1637061 evaluate_stmt
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2273
0x1639601 visit_assignment
/repo/gcc-trunk/gcc/tree-ssa-ccp.cc:2937
0x1712453 ssa_propagation_engine::simulate_stmt(gimple*)
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:216
0x171273a ssa_propagation_engine::simulate_block(basic_block_def*)
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:323
0x1712b8c ssa_propagation_engine::ssa_propagate()
/repo/gcc-trunk/gcc/tree-ssa-propagate.cc:470
/repo/gcc-trunk/binary-trunk-20260924210627-g4cb4c35d75c-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-20260924210627-g4cb4c35d75c-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 -mavx512f
-mtune=generic -march=x86-64 -Og -o /tmp/ccvqm7To.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-20260924210627-g4cb4c35d75c-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-20260924210627-g4cb4c35d75c-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260924 (experimental) (GCC)