[gcc r12-6175] Add testcase for PR103615
Richard Biener
rguenth@gcc.gnu.org
Mon Jan 3 08:57:41 GMT 2022
https://gcc.gnu.org/g:660e5834667a9efdb4d400dfb83caa48c9dd9f9b
commit r12-6175-g660e5834667a9efdb4d400dfb83caa48c9dd9f9b
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jan 3 09:56:13 2022 +0100
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.
Diff:
---
gcc/testsuite/gcc.dg/torture/pr103615.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/torture/pr103615.c b/gcc/testsuite/gcc.dg/torture/pr103615.c
new file mode 100644
index 00000000000..2109245e622
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103615.c
@@ -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;
+}
More information about the Gcc-cvs
mailing list