diff gcc/testsuite/gcc.c-torture/compile/pr86637-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.c-torture/compile/pr86637-2.c	Thu Feb 13 11:34:05 2020 +0900
@@ -0,0 +1,130 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fgraphite } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-floop-parallelize-all -fsave-optimization-record -ftree-parallelize-loops=2 -ftree-slp-vectorize" } */
+
+#include <stdint.h>
+#include <stdlib.h>
+
+signed char qq;
+int rm, mu, l9;
+long long unsigned int ip;
+
+void
+fi (void)
+{
+}
+
+void
+il (long long unsigned int c5)
+{
+  int *na = &mu;
+
+  while (l9 < 1)
+    {
+      if (qq < 1)
+        {
+          short int ds = 0;
+
+          if ((ip - *na - ip / c5 != 0) && (*na / ((c5 + c5) && !!ip) != 0))
+            __builtin_trap ();
+
+          rm = -1 / (!!rm && !!c5);
+
+          while (qq < 1)
+            {
+              ++*na;
+              ++ip;
+              if (*na < (int) ip)
+                while (ds < 2)
+                  {
+                    ++qq;
+                    ++ds;
+                  }
+            }
+        }
+
+      ++l9;
+    }
+
+  for (;;)
+    {
+    }
+}
+
+void
+uu (short int wk)
+{
+  int64_t tl = ip;
+
+  while (ip < 2)
+    {
+      signed char vn;
+
+      for (vn = 1; vn != 0; ++vn)
+        {
+          int rh;
+
+          if (qq < 1)
+            {
+              while (mu < 1)
+                ip = 0;
+
+              while (rm != 0)
+                ++rm;
+            }
+
+          for (rh = 0; rh < 3; ++rh)
+            {
+              int ab;
+
+              for (ab = 0; ab < 5; ++ab)
+                {
+                  tl -= qq;
+                  wk += rh - tl;
+                  ip += (ab < wk) + wk;
+                }
+            }
+        }
+    }
+}
+
+void
+im (uint8_t kt)
+{
+  int wu = 0;
+
+  for (;;)
+    {
+      ++rm;
+      if (rm < 1)
+        {
+          short int ms = 0;
+
+          while (kt < 1)
+            {
+              ms += rm < 0;
+
+              if (wu != 0)
+                for (;;)
+                  {
+                  }
+
+              while (ms < 4)
+                {
+                  while (wu < 1)
+                    wu += 2;
+
+                  ++ms;
+                }
+            }
+
+          if (ms == 0 || wu == 0)
+            break;
+        }
+    }
+
+  while (wu < 1)
+    while (qq < 1)
+      ++qq;
+}