diff mbox

Testcases for fixed PRs

Message ID alpine.LNX.2.00.1104281154260.810@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener April 28, 2011, 9:54 a.m. UTC
Committed.

Richard.

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.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/tree-ssa/vrp57.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/vrp57.c	(revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/vrp57.c	(revision 0)
@@ -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" } } */
Index: gcc/testsuite/gcc.dg/pr15347.c
===================================================================
--- gcc/testsuite/gcc.dg/pr15347.c	(revision 0)
+++ gcc/testsuite/gcc.dg/pr15347.c	(revision 0)
@@ -0,0 +1,10 @@ 
+/* { dg-do link } */
+
+extern void link_error (void);
+int
+main ()
+{
+  if ("<12ers" + 1 == 0)
+    link_error ();
+  return 0;
+}