From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9984 invoked by alias); 2 Jun 2015 18:41:57 -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 9930 invoked by uid 48); 2 Jun 2015 18:41:54 -0000 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66377] [F95] Wrong-code with equivalenced array in module Date: Tue, 02 Jun 2015 18:41: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: 6.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: cc 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: 2015-06/txt/msg00197.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66377 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- Here's a slightly different testcase, which works as expected. module constant integer x1, x2, y1, y2 equivalence (y1,x1), (x2,y2) end module program test use constant y1 = 1 x2 = 2 call another() contains subroutine another() use constant, only : x1, y2 if (x1 /= 1 .or. x2 /= 2) call abort end subroutine end program Thus, there is something about the "arrayness" of x in the original testcase that matters. Off-by-one maybe?