mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
Add testcase for PR103615
This adds a testcase for a fixed wrong-code bug. 2022-01-03 Richard Biener <rguenther@suse.de> PR tree-optimization/103615 * gcc.dg/torture/pr103615.c: New testcase.
This commit is contained in:
13
gcc/testsuite/gcc.dg/torture/pr103615.c
Normal file
13
gcc/testsuite/gcc.dg/torture/pr103615.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
int z = 5;
|
||||
int a[6] = { 0, 0, 0, 0, 0, 1 };
|
||||
int main()
|
||||
{
|
||||
for (int x = 5; x; x--)
|
||||
for (int y = z; y >= x; y--)
|
||||
a[y - x] += a[y];
|
||||
if (a[0] != 7)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user