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

            Bug ID: 127261
           Summary: [15/16/17 Regression] ICE at -O2
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Reproducer: https://godbolt.org/z/joned964h
Reduced case:
#include <stdint.h>
uint16_t g6, g20;
_Bool g24_a1;
void g24() {
  _Bool c10 = 1, c14, c15;
  uint32_t v13;
lbl_f11_b25:
  if (g24_a1)
    goto lbl_f11_b29;
lbl_f11_b27:
  goto lbl_f11_b32;
lbl_f11_b29:
  g24_a1 = 0;
  int16_t __ov_tmp_g20;
  c14 = __builtin_mul_overflow(g6, g20, &__ov_tmp_g20);
  if (c10)
    goto lbl_f11_b32;
lbl_f11_b32:
  v13 = c15 ? ~00 : 0;
  c15 = g24_a1 ^ c14 ^ 1 ^ 1;
  __builtin_clz(v13);
  if (c14)
    goto lbl_f11_b27;
  c10 = 0;
  goto lbl_f11_b25;
}

Dump at -O2:
gcc: internal compiler error: cc1 terminated by signal 11 (Segmentation fault)

Reply via email to