re PR tree-optimization/40052 (missed optimizations on (extended) logical types:...
authorRichard Guenther <rguenther@suse.de>
Thu, 28 Apr 2011 09:55:41 +0000 (09:55 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 28 Apr 2011 09:55:41 +0000 (09:55 +0000)
2011-04-28  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/40052
PR tree-optimization/15347
* gcc.dg/tree-ssa/vrp57.c: New testcase.
* gcc.dg/pr15347.c: Likewise.

From-SVN: r173064

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr15347.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/vrp57.c [new file with mode: 0644]

index 9891d226562bb10f31741929e1a3b4c9c983e725..7f3804b98cb8f5968cc943b3890ebec7373af769 100644 (file)
@@ -1,3 +1,10 @@
+2011-04-28  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/40052
+       PR tree-optimization/15347
+       * gcc.dg/tree-ssa/vrp57.c: New testcase.
+       * gcc.dg/pr15347.c: Likewise.
+
 2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/48530
diff --git a/gcc/testsuite/gcc.dg/pr15347.c b/gcc/testsuite/gcc.dg/pr15347.c
new file mode 100644 (file)
index 0000000..b95b0ea
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do link } */
+
+extern void link_error (void);
+int
+main ()
+{
+  if ("<12ers" + 1 == 0)
+    link_error ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp57.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp57.c
new file mode 100644 (file)
index 0000000..c736adc
--- /dev/null
@@ -0,0 +1,17 @@
+/* PR40052 */
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vrp -fdump-tree-optimized" } */
+
+int foo(_Bool b)
+{
+    return b | 1;
+}
+
+int bar(_Bool b)
+{
+    return b & -2;
+}
+
+/* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
+/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */