[gcc r13-8524] testsuite: Add testcase for already fixed PR [PR109925]
Jakub Jelinek
jakub@gcc.gnu.org
Sat Mar 30 03:55:44 GMT 2024
https://gcc.gnu.org/g:43022dd24e82a8625895e35da2b7e5a45f3b7483
commit r13-8524-g43022dd24e82a8625895e35da2b7e5a45f3b7483
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Mar 28 11:58:26 2024 +0100
testsuite: Add testcase for already fixed PR [PR109925]
This testcase was made latent by r14-4089 and got fixed both
on the trunk and 13 branch with PR113372 fix.
Adding testcase to the testsuite and will close the PR as a dup.
2024-03-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/109925
* gcc.c-torture/execute/pr109925.c: New test.
(cherry picked from commit 7942558f27038461f948ca10140a156ae678cdf8)
Diff:
---
gcc/testsuite/gcc.c-torture/execute/pr109925.c | 30 ++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr109925.c b/gcc/testsuite/gcc.c-torture/execute/pr109925.c
new file mode 100644
index 00000000000..929673b6b63
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr109925.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/109925 */
+
+int a, c, f;
+
+int
+main ()
+{
+ int g[2];
+ for (c = 0; c < 2; c++)
+ {
+ {
+ char h[20], *b = h;
+ int d = 48, e = 0;
+ while (d && e < 5)
+ b[e++] = d /= 10;
+ f = e;
+ }
+ g[f - 2 + c] = 0;
+ }
+ for (;;)
+ {
+ for (; a <= 4; a++)
+ if (g[0])
+ break;
+ break;
+ }
+ if (a != 5)
+ __builtin_abort ();
+ return 0;
+}
More information about the Gcc-cvs
mailing list