https://gcc.gnu.org/g:03d11c2142d2b375161fa50d367c2bb9bfe742bd
commit 03d11c2142d2b375161fa50d367c2bb9bfe742bd Author: Robin Dapp <rd...@ventanamicro.com> Date: Mon May 6 15:51:37 2024 -0600 RISC-V: Add testcase for PR114749. this adds a test case for PR114749. Going to commit as obvious unless somebody complains. Regards Robin gcc/testsuite/ChangeLog: PR tree-optimization/114749 * gcc.target/riscv/rvv/autovec/pr114749.c: New test. Diff: --- gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114749.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114749.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114749.c new file mode 100644 index 00000000000..6733b0481a6 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr114749.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv_zvl128b -mabi=lp64d -fwhole-program -O3 -mrvv-vector-bits=zvl" } */ + +extern int a[]; +extern char b[]; +int c = 24; +_Bool d[24][24][24]; +_Bool (*e)[24][24] = d; +int main() { + for (short f = 0; f < 24; f += 3) + for (unsigned g = 0; g < (char)c; g += 2) { + a[f] = 0; + b[g] |= ({ e[f][f][f]; }); + } +}