From patchwork Thu Apr 28 09:54:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 93203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8EF64B6F0A for ; Thu, 28 Apr 2011 19:55:08 +1000 (EST) Received: (qmail 4617 invoked by alias); 28 Apr 2011 09:55:06 -0000 Received: (qmail 4604 invoked by uid 22791); 28 Apr 2011 09:55:05 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Apr 2011 09:54:45 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 3EAD479727 for ; Thu, 28 Apr 2011 11:54:44 +0200 (CEST) Date: Thu, 28 Apr 2011 11:54:44 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Testcases for fixed PRs Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Committed. Richard. 2011-04-28 Richard Guenther 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; +}