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

            Bug ID: 121844
           Summary: [16,15 Regression] RISCV rv64gcv: Trigger error at -Os
                    during GIMPLE pass: ivopts
           Product: gcc
           Version: 16.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: ---

Testcase:
#include <stdint.h>
typedef uint64_t a;
int32_t b[] = {};
int32_t **c;
int16_t d() {
  a *e;
  int32_t f;
  *c = &f;
  for (;;)
    asm goto("" : : : : g);
  for (; f; f--) {
    asm goto("" : : : : g);
  g:
    *e ^= b[f + 1];
  }
}

Command:
> riscv64-unknown-elf-gcc -march=rv64gcv -Os reduced.c
> crash infomation...

Reproducer: https://godbolt.org/z/YnqndEq69

Reply via email to