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

            Bug ID: 121565
           Summary: ICE (segfault) with LTO and __riscv_vsetvl_e32m8
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: konstantin.vladimirov at gmail dot com
  Target Milestone: ---

Reproduction

---

#include <riscv_vector.h>
int main(){
    int src_len = 25;
    while(src_len > 0) {
        size_t vl = __riscv_vsetvl_e32m8(src_len);
        src_len -= vl;
    }
}

---

Live example:

https://godbolt.org/z/axWMbx4W1

---

Compilation line

gcc -march=rv64gcv -flto test.c

---

gcc version 16.0.0 20250815 (experimental) (crosstool-NG UNKNOWN) 

---

Fails on lto1 run.
  • [Bug lto/121565] New: ... konstantin.vladimirov at gmail dot com via Gcc-bugs

Reply via email to