public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] testsuite: Add testcase for already fixed PR [PR109925]
@ 2024-03-28 11:01 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-03-28 11:01 UTC (permalink / raw)
  To: gcc-patches

Hi!

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.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as
obvious.

2024-03-28  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/109925
	* gcc.c-torture/execute/pr109925.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/pr109925.c.jj	2024-03-27 17:54:32.836301831 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr109925.c	2024-03-27 17:54:18.602494494 +0100
@@ -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;
+}

	Jakub


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-28 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 11:01 [committed] testsuite: Add testcase for already fixed PR [PR109925] Jakub Jelinek

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).