]> gcc.gnu.org Git - gcc.git/commitdiff
re PR rtl-optimization/81020 (wrong code with -O -fno-tree-bit-ccp -fno-tree-coalesce...
authorJakub Jelinek <jakub@redhat.com>
Tue, 28 Nov 2017 10:22:31 +0000 (11:22 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 28 Nov 2017 10:22:31 +0000 (11:22 +0100)
PR rtl-optimization/81020
* gcc.dg/pr81020.c: New test.

From-SVN: r255193

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

index fd6475f31b3a43ee9b22d858f7842555b588a3b1..6f3b47585d54f8d10c701fea7ca1266fff79671d 100644 (file)
@@ -1,5 +1,8 @@
 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
 
+       PR rtl-optimization/81020
+       * gcc.dg/pr81020.c: New test.
+
        PR tree-optimization/80788
        * gcc.dg/pr80788.c: New test.
 
diff --git a/gcc/testsuite/gcc.dg/pr81020.c b/gcc/testsuite/gcc.dg/pr81020.c
new file mode 100644 (file)
index 0000000..8789c65
--- /dev/null
@@ -0,0 +1,23 @@
+/* PR rtl-optimization/81020 */
+/* { dg-do run } */
+/* { dg-options "-O -fno-tree-bit-ccp -fno-tree-coalesce-vars -fno-tree-vrp" } */
+
+unsigned v = 4;
+
+unsigned long long __attribute__((noipa))
+foo (unsigned x)
+{
+  unsigned a = v;
+  a &= 1;
+  x |= 0 < a;
+  a >>= 31;
+  return x + a;
+}
+
+int
+main ()
+{
+  if (foo (2) != 2)
+    __builtin_abort ();
+  return 0;
+}
This page took 0.090203 seconds and 5 git commands to generate.