https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123576

            Bug ID: 123576
           Summary: [16 Regression] ICE: in tree_to_uhwi, at tree.cc:6693
                    at -O2 with _BitInt()
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 63333
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63333&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 testcase.c
during GIMPLE pass: forwprop
testcase.c: In function 'foo':
testcase.c:13:1: internal compiler error: in tree_to_uhwi, at tree.cc:6693
   13 | }
      | ^
0x2c9150d internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xe2b981 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1805
0x92a21d tree_to_uhwi(tree_node const*)
        /repo/gcc-trunk/gcc/tree.cc:6693
0x92a21d tree_to_uhwi(tree_node const*)
        /repo/gcc-trunk/gcc/tree.cc:6691
0x1c25699 gimple_simplify_187(gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node*, tree_node**)
        /repo/build-gcc-trunk-amd64/gcc/gimple-match-2.cc:4043
0x1f8e24c gimple_simplify_BIT_IOR_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-10.cc:43832
0x1fe2f2d gimple_resimplify2
        /repo/gcc-trunk/gcc/gimple-match-exports.cc:1027
0x1fe37de gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node*
(*)(tree_node*), tree_node* (*)(tree_node*))
        /repo/gcc-trunk/gcc/gimple-match-exports.cc:894
0x120e752 fold_stmt_1
        /repo/gcc-trunk/gcc/gimple-fold.cc:6838
0x17b6b0d execute
        /repo/gcc-trunk/gcc/tree-ssa-forwprop.cc:5708
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-20260113143958-r16-6743-ge787d5ace5cc31-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 --enable-libsanitizer --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 --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260113143958-r16-6743-ge787d5ace5cc31-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260113 (experimental) (GCC)

Reply via email to