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

            Bug ID: 101132
           Summary: [11/12 regression] [MIPS/MSA] internal compiler error:
                    in do_store_flag, at expr.c:12541
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xry111 at mengyan1223 dot wang
  Target Milestone: ---

Reproducer:

int r_0, q_0;
void bar() {
  int i;
  for (i = 0; i < 96; i++) {
    r_0 = i << i ? 2 + i : -i;
    q_0 = r_0 > 2 ?: i;
  }
}

Error message:

testcase.i: In function ‘bar’:
testcase.i:2:6: internal compiler error: in do_store_flag, at expr.c:12541
    2 | void bar() {
      |      ^~~
0xdacde9 do_store_flag
        ../../gcc/gcc/expr.c:12541
0xd9fecd expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../gcc/gcc/expr.c:9859
0xda2748 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:10409
0xd9aa61 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        ../../gcc/gcc/expr.c:8642
0xf0da1a expand_normal
        ../../gcc/gcc/expr.h:307
0xf18702 expand_vec_cond_optab_fn
        ../../gcc/gcc/internal-fn.c:2802
0xf1d85e expand_VCOND
        ../../gcc/gcc/internal-fn.def:143
0xf1f330 expand_internal_call(internal_fn, gcall*)
        ../../gcc/gcc/internal-fn.c:4093
0xf1f35b expand_internal_call(gcall*)
        ../../gcc/gcc/internal-fn.c:4101
0xbf2f30 expand_call_stmt
        ../../gcc/gcc/cfgexpand.c:2752
0xbf6fcf expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3850
0xbf7659 expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:4014
0xbff943 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:6056
0xc01bea execute
        ../../gcc/gcc/cfgexpand.c:6782
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.

It looks very similar to PR95830, but I'm not sure if they are really related.

Reply via email to