aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2023-12-04 16:06:14 +0800
committerPan Li <pan2.li@intel.com>2023-12-04 16:11:10 +0800
commit462ccc3b9d5625cdc6104322a417bcd1ff1a8ff4 (patch)
tree97737a8d7eb6a728417b64bdfbbf95713e801c98
parent4586d7d0a92e9b60d0c01043e0ae262b1e06f337 (diff)
downloadgcc-462ccc3b9d5625cdc6104322a417bcd1ff1a8ff4.zip
gcc-462ccc3b9d5625cdc6104322a417bcd1ff1a8ff4.tar.gz
gcc-462ccc3b9d5625cdc6104322a417bcd1ff1a8ff4.tar.bz2
RISC-V: Add test case for bug PR112813
The bugzilla 112813 has been fixed recently, add below test case for the bug. PR target/112813 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/pr112813-1.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
-rw-r--r--gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr112813-1.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr112813-1.c b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr112813-1.c
new file mode 100644
index 0000000..5aab9c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr112813-1.c
@@ -0,0 +1,32 @@
+/* Test that we do not have ice when compile */
+/* { dg-do compile } */
+/* { dg-options "-march=rv32gcv_zvl256b -mabi=ilp32d -O3" } */
+
+int a, c, d, f, j;
+int b[7];
+long e;
+char *g;
+int *h;
+long long *i;
+
+void k() {
+ int l[][1] = {{}, {1}, {1}};
+ int *m = &d, *n = &l[0][0];
+
+ for (; e;)
+ {
+ f = 3;
+
+ for (; f >= 0; f--)
+ {
+ *m &= b[f] >= 0;
+ j = a >= 2 ? 0 : 1 >> a;
+ *i |= j;
+ }
+
+ for (; c;)
+ *g = 0;
+ }
+
+ h = n;
+}