From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11444 invoked by alias); 23 Jul 2013 19:53:58 -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 11355 invoked by uid 48); 23 Jul 2013 19:53:54 -0000 From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57904] Bogus(?) "invokes undefined behavior" warning with Fortran's finalization wrapper (gfortran.dg/class_48.f90) Date: Tue, 23 Jul 2013 19:53: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.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org 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: bug_status cf_reconfirmed_on cc everconfirmed 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-07/txt/msg01086.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57904 Martin Jambor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-07-23 CC| |jakub at gcc dot gnu.org, | |jamborm at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Martin Jambor --- I'm not really sure what the warning is about. The warning is emitted in the cunrolli (note the i at the end) pass when it also dumps the following to the dump: Statement _16 = idx_15 + -1; is executed at most 2147483647 (bounded by 2147483647) + 1 times in loop 3. which looks suspicious. However, the whole loop is guarded by cndition (ubound.0_3 > 0) which IPA-CP tells us is false, so the code is never executed. Indeed the whole loop disappears in the very next pass dump ccp2 and scheduling an extra ccp before cunrolli makes the warning go away. Having said that, I'm not sure how to proceed at the moment and have to leave my office pretty much immediately :-) Parhaps Jakub, who introduced the warning, might have an idea?