Skip to content

Commit

Permalink
RISC-V: Add test case for bug PR112813
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Incarnation-p-lee committed Dec 4, 2023
1 parent 4586d7d commit 462ccc3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions 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;
}

0 comments on commit 462ccc3

Please sign in to comment.