* [PATCH] Testcases for fixed PRs
@ 2011-04-28 11:17 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2011-04-28 11:17 UTC (permalink / raw)
To: gcc-patches
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.
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;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-28 9:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-28 11:17 [PATCH] Testcases for fixed PRs Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).