]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/110640 - testcase for fixed bug
authorRichard Biener <rguenther@suse.de>
Thu, 14 Dec 2023 07:40:00 +0000 (08:40 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 14 Dec 2023 07:41:14 +0000 (08:41 +0100)
PR tree-optimization/110640
* gcc.dg/torture/pr110640.c: New testcase.

gcc/testsuite/gcc.dg/torture/pr110640.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/torture/pr110640.c b/gcc/testsuite/gcc.dg/torture/pr110640.c
new file mode 100644 (file)
index 0000000..7667294
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
+
+unsigned short a = 65535;
+int b, f, g;
+int *c = &b;
+long d;
+short e;
+static int *h(int);
+void i() { h(a); }
+int *h(int j) {
+  unsigned char k;
+  for (; e != 8; e = e + 4)
+    k = 0;
+  for (; (unsigned char)(j-181249535) + k <= 1; k++) {
+    *c = d;
+    for (; f; f++)
+      ;
+  }
+  return &g;
+}
+int main() { i(); }