]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2013-10-23 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2013 11:57:21 +0000 (11:57 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 Oct 2013 11:57:21 +0000 (11:57 +0000)
* gcc.dg/torture/pr58830.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203957 138bc75d-0d04-0410-961f-82ee72b054a4

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

index f71e314dd1a32c2a094b3c3e19935034c3a5dee0..4176c00a07db472ad300d86725c0555a6fa463fe 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-23  Richard Biener  <rguenther@suse.de>
+
+       * gcc.dg/torture/pr58830.c: New testcase.
+
 2013-10-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
 
        Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
diff --git a/gcc/testsuite/gcc.dg/torture/pr58830.c b/gcc/testsuite/gcc.dg/torture/pr58830.c
new file mode 100644 (file)
index 0000000..8081f8b
--- /dev/null
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-pre -ftree-partial-pre" } */
+
+extern void abort (void);
+
+int b, c, d, f, g, h, i, j[6], *l = &b, *m, n, *o, r; 
+char k;
+
+static int
+foo ()
+{
+  char *p = &k;
+
+  for (; d; d++)
+    if (i)
+      h = 0;
+    else
+      h = c || (r = 0);
+
+  for (f = 0; f < 2; f++)
+    {
+      unsigned int q;
+      *l = 0;
+      if (n)
+       *m = g;
+      if (g)
+       o = 0;
+      for (q = -8; q >= 5; q++)
+       (*p)--;
+    }
+
+  return 0;
+}
+
+int
+main ()
+{
+  foo ();
+  if (j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ^ (k & 15)] != 0)
+    abort ();
+  return 0;
+}