public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6175] Add testcase for PR103615
@ 2022-01-03 8:57 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-01-03 8:57 UTC (permalink / raw)
To: gcc-cvs
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;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-03 8:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 8:57 [gcc r12-6175] Add testcase for PR103615 Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).