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

            Bug ID: 100521
           Summary: ICE at -O2 and above: in verify_range, at
                    value-range.cc:384
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.FUbEknNORK-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210511 (experimental) [master revision
:7db32cac8:aa891c56f25baac94db004e309d1b6e40b770a95] (GCC)

$ cat mutant.c
__builtin_clz(int a) { return __builtin_clz(a); }

$ gcc-trunk -O2 mutant.c
mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | __builtin_clz(int a) { return __builtin_clz(a); }
      | ^~~~~~~~~~~~~
during GIMPLE pass: evrp
mutant.c: In function ‘__builtin_clz’:
mutant.c:1:1: internal compiler error: in verify_range, at value-range.cc:384
0x7ccac7 irange::verify_range()
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/value-range.cc:384
0x191c65b range_of_builtin_call(range_query&, irange&, gcall*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:774
0x191d11a gimple_ranger::range_of_builtin_call(irange&, gcall*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:900
0x191d11a gimple_ranger::range_of_call(irange&, gcall*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:602
0x191e67d gimple_ranger::calc_stmt(irange&, gimple*, tree_node*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:378
0x191ea14 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:1077
0x19197a2 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-range.cc:960
0x120fdb4 range_query::value_of_expr(tree_node*, gimple*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/value-query.cc:86
0x192b625 hybrid_folder::value_of_expr(tree_node*, gimple*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-ssa-evrp.c:235
0x10abf46 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree-ssa-propagate.c:816
0x18edc87 dom_walker::walk(basic_block_def*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/domwalk.c:309
0x10ab239 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree-ssa-propagate.c:987
0x192b28e execute_early_vrp
        /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-ssa-evrp.c:349
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to