From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20309 invoked by alias); 22 Aug 2013 08:23:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20266 invoked by uid 48); 22 Aug 2013 08:23:31 -0000 From: "roland.kaufmann at uni dot no" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58100] Spurious "DO loop at (1) will be executed zero times" warning Date: Thu, 22 Aug 2013 08:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: roland.kaufmann at uni dot no X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01144.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58100 --- Comment #5 from Roland Kaufmann --- (In reply to Tobias Burnus from comment #3) > Roland: Is the new warning option -W(no-)zerotrip sufficient for you? As a general principle: I believe that the compiler should not issue any warnings if run without options on correct code. If you are compiling code you didn't write yourself, on a new architecture, then every warning should be a flag for further checking. Having spurious warnings erodes this and increases the likelihood of real problems being "drowned", because no-one pays attention anymore. That said, I perfectly understand the problem of separating the various compiler stages and Fortran is not the easiest language to do static analysis for either. It seems from r201658 of resolve.c it will not surface with no option anymore, surface with -Wall and disappear again with -Wall -Wno-zerotrip, so that'll have to be good enough.