From patchwork Mon Aug 3 16:59:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 503248 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5A842140E40 for ; Tue, 4 Aug 2015 03:00:05 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Ub7H6E6J; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=CevLo3jy4xDSfWGrzf8NOVehz1vsnWu45qP1Uyb+Ux5 8vRiUfvjDHk7OCP8/Qjy6/h7TPbvHvFFXSIJXzQcvdD+xSvp6LBU+wlr3nG6f3J6 vB2UD81N5QxvLixEqyg8QNQfHjfK7M7VqdvymIh29xRdrdrXF6swK/ygFXRfWs8Q = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=4Jra4Vbqa/k4QiPTE3lknxnvH5k=; b=Ub7H6E6JY+r7ie7j6 vc5ThIpOt+34I0oVyZMGu2UnKzGgRgq782UVEz9OkvOGvXsOBSWgTSh3Y4oAKVRA hM8MvOdUpBYIq8ECPznKleB/+eutpzE+alhGhBk5xBWz6Lzf1QAP+csehLQFrHfk wu2rH2kYpTTnv6ILk67yMFICbg= Received: (qmail 89958 invoked by alias); 3 Aug 2015 16:59:57 -0000 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 Received: (qmail 89947 invoked by uid 89); 3 Aug 2015 16:59:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Aug 2015 16:59:55 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 03 Aug 2015 09:59:54 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.52]) by fmsmga001.fm.intel.com with ESMTP; 03 Aug 2015 09:59:54 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id F344FC38E0; Mon, 3 Aug 2015 09:59:53 -0700 (PDT) Date: Mon, 3 Aug 2015 09:59:53 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: [committed, PATCH]: Add a testcase for PR tree-optimization/67077 Message-ID: <20150803165953.GA29683@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67077 is fixed by https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=226089 I checked in this patch to add a testcase for PR tree-optimization/67077. Index: ChangeLog =================================================================== --- ChangeLog (revision 226516) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2015-08-03 H.J. Lu + + PR tree-optimization/67077 + * gcc.dg/pr67077.c: New test. + 2015-08-03 Jeff Law PR middle-end/66314 Index: gcc.dg/pr67077.c =================================================================== --- gcc.dg/pr67077.c (revision 0) +++ gcc.dg/pr67077.c (working copy) @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -O2" } */ + +unsigned char buffer[8]; +unsigned long +foo (void) +{ + unsigned long i; + i = buffer[0]; + if (i >= 8) + return i - 7; + i++; + while (i > 8) + { + if (buffer[i-1] != 0) + return 0; + i--; + } + return 1; +}