From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19070 invoked by alias); 12 Nov 2010 20:34:27 -0000 Received: (qmail 18830 invoked by uid 22791); 12 Nov 2010 20:34:26 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Nov 2010 20:33:39 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45742] VOLATILE has no effect X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 12 Nov 2010 20:55:00 -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 X-SW-Source: 2010-11/txt/msg01713.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45742 --- Comment #3 from Tobias Burnus 2010-11-12 20:33:36 UTC --- I think the first test case is wrongly folded already by the front end: program main integer, volatile :: j if (j>j) call notfound end program main Gives the original dump: MAIN__ () { volatile integer(kind=4) j; L.1:; } * * * For some reason, also: program main integer, volatile :: j, k if (j>k) call notfound end program main does not give a link error. The optimized dump has: j.1_8 ={v} j; k.2_9 ={v} k; if (j.1_8 > k.2_9) goto ; : notfound (); which looks OK, but there is no link error?!?