From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Testcases for fixed PRs
Date: Thu, 28 Apr 2011 11:17:00 -0000 [thread overview]
Message-ID: <alpine.LNX.2.00.1104281154260.810@zhemvz.fhfr.qr> (raw)
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;
+}
reply other threads:[~2011-04-28 9:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1104281154260.810@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).