From patchwork Tue Aug 12 12:34:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 35255 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A6AE520540 for ; Tue, 12 Aug 2014 12:35:35 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id eu11sf70486942pac.3 for ; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-original-sender :x-original-authentication-results:content-type; bh=DBAlfePk97sU5GsfTl7ITsnnWOV3YrmhHYgWxWf29Mc=; b=VurVw7QoNESO3G4suLINO5AzpVE6xTU6mS55W09tUzhWNSg245ZUlazdMcaXHohphS 7Yk4QPjgiIcezyXYh+zUtfaiN50XLsFZOLGX6YsGnkGXcofz5p1oANikJ2uGQy9/i/aA MyImicMBzAFHic4r0ZA8X2BIFpfdSAfmBfM1WvBR0lGSleDPstw8znULH9NGfyVMQfRq mwzwuLRdxvPsSkxdWhuemf1WM/6ybuWK1K73iaCOc2fv0Y5GyniWCfDA8e1Rwely6odk MjcLLTS9D7QgvprYHOTSHMP6VG65kToaobyOsVTeWaxJsiHbGXJKzU7LL+lcigwAOK9D EoTA== X-Gm-Message-State: ALoCoQmtIxr303YQNtqa3rsV7wRIuS1y219LiStl6RicbMv40IjryvwwSzfEtATqv/YSrgc2l5kG X-Received: by 10.66.228.70 with SMTP id sg6mr2057210pac.2.1407846934608; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.176 with SMTP id 45ls109814qgx.16.gmail; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr3326046vcb.19.1407846934505; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [2607:f8b0:400c:c03::22a]) by mx.google.com with ESMTPS id n4si8104208vcm.58.2014.08.12.05.35.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 05:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22a as permitted sender) client-ip=2607:f8b0:400c:c03::22a; Received: by mail-vc0-f170.google.com with SMTP id lf12so13254153vcb.29 for ; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) X-Received: by 10.220.110.77 with SMTP id m13mr3402750vcp.35.1407846934363; Tue, 12 Aug 2014 05:35:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp244887vcb; Tue, 12 Aug 2014 05:35:33 -0700 (PDT) X-Received: by 10.70.95.100 with SMTP id dj4mr4121871pdb.94.1407846932988; Tue, 12 Aug 2014 05:35:32 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id be16si12369606pdb.233.2014.08.12.05.35.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Aug 2014 05:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-374913-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 31428 invoked by alias); 12 Aug 2014 12:35:21 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 31409 invoked by uid 89); 12 Aug 2014 12:35:18 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f51.google.com Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 Aug 2014 12:35:16 +0000 Received: by mail-pa0-f51.google.com with SMTP id ey11so12960082pad.38 for ; Tue, 12 Aug 2014 05:35:15 -0700 (PDT) X-Received: by 10.68.200.101 with SMTP id jr5mr4059809pbc.36.1407846914866; Tue, 12 Aug 2014 05:35:14 -0700 (PDT) Received: from [10.1.1.8] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by mx.google.com with ESMTPSA id do10sm22071237pdb.83.2014.08.12.05.35.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Aug 2014 05:35:14 -0700 (PDT) Message-ID: <53EA09EA.1030905@linaro.org> Date: Tue, 12 Aug 2014 22:34:50 +1000 From: Kugan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Richard Biener CC: "gcc-patches@gcc.gnu.org" Subject: Re: PR tree-optimization/52904 testcase References: <53E6151A.203@linaro.org> <53E98117.9090904@linaro.org> In-Reply-To: X-IsSubscribed: yes X-Original-Sender: kugan.vivekanandarajah@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22a as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 >>> Did you verify the testcase fails before the revision that fixed it? >>> Esp. the placement of the dg-bogus looks bogus to me. >> >> I tried it on Linaro 4.9 (It should be the same in fsf gcc 4.9 branch) >> and the test cases is failing there. Passes on trunk. > > Well, it probably fails because of excess errors, not because of > the dg-bogus failing. The dg-bogus has to be on the line that > the warning triggers on. It was indeed excess errors and I wrongly assumed that this was the error I should expect. I have now moved the dg-bogus to the place where warning is being generated and verified that I am getting the error from test for bogus messages. > >> In any case, I have moved it to the top and reverified. I have also >> trimmed the warning pattern to check as there was some changes there >> from 4.9 to trunk. >> >>> >>> Also don't use -S in dg-options, use lower-case filenames and >>> avoid spurious vertical white-space. The VRP dump scan is >>> also very unspecific - I suggest to drop it entirely. >>> >> >> Done. >> >> >> Is this OK? > > Err. > > @@ -0,0 +1,24 @@ > + > > Excessive vertical space > > +/* { dg-do compile } */ > +/* { dg-options "-Wstrict-overflow -O2" } */ > +/* { dg-bogus "assuming signed overflow does not occur when simplifying" */ > + I have fixed it. Is this OK? Thanks, Kugan diff --git a/gcc/testsuite/gcc.dg/pr52904.c b/gcc/testsuite/gcc.dg/pr52904.c index e69de29..107d89e 100644 --- a/gcc/testsuite/gcc.dg/pr52904.c +++ b/gcc/testsuite/gcc.dg/pr52904.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-Wstrict-overflow -O2" } */ +extern int foo (int); + +int +wait_reading_process_output (void) +{ + int nfds = 0; + int channel; + + for (channel = 0; channel < 1024; ++channel) + { + if (foo (channel)) + nfds++; + } + + if (nfds < 0) /* { dg-bogus "assuming signed overflow does not occur" } */ + return 1; + return 0; +}