From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 711 invoked by alias); 3 Mar 2014 12:47:51 -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 666 invoked by uid 48); 3 Mar 2014 12:47:47 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60370] TRANSPOSE on rhs of allocatable array assignment gives error with -fcheck=bounds Date: Mon, 03 Mar 2014 12:47: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: diagnostic, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus 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: 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: 2014-03/txt/msg00182.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60370 --- Comment #5 from janus at gcc dot gnu.org --- (In reply to Mikael Morin from comment #4) > This patch doesn't work, so it may not be a code ordering issue after all. I think it *is* an ordering issue after all, and indeed your patch seems to fix that in the sense that it makes sure that the bounds of 'b' are set before the bounds-checking code is run. However, it also seems to introduce another ordering issue: In particular the bounds of 'b' are now set as b.dim[1].lbound = 1; b.dim[1].ubound = (D.2352 - D.2351) + 1; before those temps are actually set via D.2351 = a.dim[0].lbound; D.2352 = a.dim[0].ubound;