[committed] testsuite: Add testcase for already fixed PR [PR110251]

Message ID Zaetc+VxfYjXsb5e@tucnak
State New
Headers
Series [committed] testsuite: Add testcase for already fixed PR [PR110251] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

Jakub Jelinek Jan. 17, 2024, 10:35 a.m. UTC
  Hi!

This testcase started to hang at -O3 with r13-4208 and got fixed
with r14-2097.

Regtested on x86_64-linux and i686-linux, committed to trunk as obvious.

2024-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/110251
	* gcc.c-torture/compile/pr110251.c: New test.


	Jakub
  

Patch

--- gcc/testsuite/gcc.c-torture/compile/pr110251.c.jj	2024-01-16 20:39:50.605210933 +0100
+++ gcc/testsuite/gcc.c-torture/compile/pr110251.c	2024-01-16 20:39:43.568310057 +0100
@@ -0,0 +1,27 @@ 
+/* PR tree-optimization/110251 */
+
+int a, b;
+signed char c;
+
+int
+foo (int e)
+{
+  if (e >= 'a')
+    return e;
+}
+
+int
+bar (unsigned short e)
+{
+  for (; e; a++)
+    e &= e - 1;
+}
+
+void
+baz (void)
+{
+  while (c < 1)
+    ;
+  for (; bar (c - 1); b = foo (c))
+    ;
+}