From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5126 invoked by alias); 30 Mar 2008 12:41:22 -0000 Received: (qmail 4996 invoked by uid 48); 30 Mar 2008 12:40:39 -0000 Date: Sun, 30 Mar 2008 12:41:00 -0000 Message-ID: <20080330124039.4995.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35759] WHERE with overlap with ELSEWHERE error In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" 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: 2008-03/txt/msg02427.txt.bz2 ------- Comment #2 from pault at gcc dot gnu dot org 2008-03-30 12:40 ------- This one should be straightforward, if lengthy to correct: gfc_trans_where_2 is completely correct, as can be verified by doubling up the line making the assignment in the WHERE block. ie: WHERE (LDA) ! expected UDA1L(1:5) = UDA1R(2:6) ! uda1l = 2,0,4,0,6,0 UDA1L(1:5) = UDA1R(2:6) ! uda1l = 2,0,4,0,6,0 ELSEWHERE UDA1L(2:6) = UDA1R(6:2:-1) !uda1l = 2,0,5,0,3,0 ENDWHERE gfc_trans_where_3 is selected for a simple WHERE/ELSEWHERE, with no dependencies and a single assignment expression in each block. This is selected by Dick's testscase. It is also wrong, as indicated by Tobias in #1! gfc_trans_where_3 will have to be split into two loops, instead of a single loop with an expression. Cheers Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2008-03-29 23:23:44 |2008-03-30 12:40:39 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35759