]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add testcase for PR110940
authorJan Hubicka <jh@suse.cz>
Wed, 23 Aug 2023 09:14:53 +0000 (11:14 +0200)
committerJan Hubicka <jh@suse.cz>
Wed, 23 Aug 2023 09:14:53 +0000 (11:14 +0200)
gcc/testsuite/ChangeLog:
PR middle-end/110940
* gcc.c-torture/compile/pr110940.c: New test.

gcc/testsuite/gcc.c-torture/compile/pr110940.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr110940.c b/gcc/testsuite/gcc.c-torture/compile/pr110940.c
new file mode 100644 (file)
index 0000000..c23c5ee
--- /dev/null
@@ -0,0 +1,19 @@
+int a, b[1], c, *d = &a, e, f, g, h, i, j;
+extern int l();
+int main() {
+  if (l())
+    for (;;)
+      for (; g;)
+        for (; e;)
+          for (; a;)
+            for (; f;)
+              for (; h;)
+                for (; i;)
+                  for (; c;)
+                    for (; j;)
+                      ;
+  l();
+  for (; c; c++)
+    b[*d] = 0;
+  return 0;
+}