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

            Bug ID: 117138
           Summary: [15 Regression] ICE: tree check: expected none of
                    vector_type, have vector_type in range_compatible_p,
                    at value-range.h:1796 with -O2 -msse4
           Product: gcc
           Version: 15.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 59346
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59346&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -msse4 testcase.c 
during GIMPLE pass: dom
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: tree check: expected none of
vector_type, have vector_type in range_compatible_p, at value-range.h:1796
    5 | foo ()
      | ^~~
0x2c7f74e internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0x8c7cfc tree_not_check_failed(tree_node const*, char const*, int, char const*,
...)
        /repo/gcc-trunk/gcc/tree.cc:9040
0xe3d33b tree_not_check(tree_node*, char const*, int, char const*, tree_code)
        /repo/gcc-trunk/gcc/tree.h:3642
0xe3d33b range_compatible_p(tree_node*, tree_node*)
        /repo/gcc-trunk/gcc/value-range.h:1796
0xe3d33b fold_using_range::condexpr_adjust(vrange&, vrange&, gimple*,
tree_node*, tree_node*, tree_node*, fur_source&)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:1142
0x2a4d57d fold_using_range::range_of_cond_expr(vrange&, gassign*, fur_source&)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:1230
0x2a51cf1 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:674
0x2a394a6 gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
        /repo/gcc-trunk/gcc/gimple-range.cc:277
0x2a394a6 gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        /repo/gcc-trunk/gcc/gimple-range.cc:338
0x2a37ca9 gimple_ranger::range_on_entry(vrange&, basic_block_def*, tree_node*)
        /repo/gcc-trunk/gcc/gimple-range.cc:171
0x2a3ad8f gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*)
        /repo/gcc-trunk/gcc/gimple-range.cc:146
0x1701fa3 cprop_operand
        /repo/gcc-trunk/gcc/tree-ssa-dom.cc:2037
0x17043c2 cprop_into_stmt
        /repo/gcc-trunk/gcc/tree-ssa-dom.cc:2114
0x17043c2 dom_opt_dom_walker::optimize_stmt(basic_block_def*,
gimple_stmt_iterator*, bool*)
        /repo/gcc-trunk/gcc/tree-ssa-dom.cc:2342
0x1705bb7 dom_opt_dom_walker::before_dom_children(basic_block_def*)
        /repo/gcc-trunk/gcc/tree-ssa-dom.cc:1747
0x29db2ae dom_walker::walk(basic_block_def*)
        /repo/gcc-trunk/gcc/domwalk.cc:311
0x1706648 execute
        /repo/gcc-trunk/gcc/tree-ssa-dom.cc:939
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-r15-4339-20241014183748-gde0320712d0-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.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 --with-cloog --with-ppl --with-isl
--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-r15-4339-20241014183748-gde0320712d0-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20241014 (experimental) (GCC)

Reply via email to