------- 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