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

            Bug ID: 101497
           Summary: ice in type, at value-range.h:221
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

char uc_1;
int i_4, func_12_uli_6;
void func_12() {
  int *ptr_8 = &func_12_uli_6;
  *ptr_8 = 0 >= 211 - uc_1 <= 0;
  i_4 %= 0;
  i_4 *= *ptr_8;
}

compiled by recent gcc trunk, does this:

$ /home/dcb/gcc/results/bin/gcc -c -O2 -w bug737.c 
during GIMPLE pass: evrp
bug737.c: In function ‘func_12’:
bug737.c:8:1: internal compiler error: in type, at value-range.h:221
    8 | }
      | ^
0x884da8 irange::type() const
        ../../trunk.git/gcc/value-range.h:221
0x884da8 fold_using_range::range_of_cond_expr(irange&, gassign*, fur_source&)
        ../../trunk.git/gcc/gimple-range-fold.cc:1114
0x1b0e0ac fold_using_range::fold_stmt(irange&, gimple*, fur_source&, tree_node*
)
        ../../trunk.git/gcc/gimple-range-fold.cc:521
0x1b00091 gimple_ranger::fold_range_internal(irange&, gimple*, tree_node*)
        ../../trunk.git/gcc/gimple-range.cc:154

Bug first seems to occur sometime between git hash 7466a0a5d8d536ab
and 94ba897be8b59ef5

Reply via email to