This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR35759 - WHERE with overlap with ELSEWHERE error


Dominique,

Thanks for pointing out that the patch fixes PR35756 as well - I
should have seen that.  I will extend the testcase, regtest once more
and commit tonight.

Cheers

Paul

PS Memo to self - ensure that allocatable components do not leak for
this patch, at least:)  I'll post what I finally commit.

On Sun, Mar 30, 2008 at 9:30 PM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> :ADDPATCH fortran:
>
>  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 the reporter's testscase.  As Tobias found in comment
>  #1 of the PR, gfc_trans_where is not compliant with the standard
>  because the ELSEWHERE assignment is evaluated in the same loop as the
>  WHERE assignment, rather than two loops.  The fix is self explanatory.
>
>  Bootstrapped and regtested on x86_ia64/FC8 - OK for trunk and 4.3?
>
>  Paul
>
>  2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/35759
>         * trans-stmt.c (gfc_trans_where_3): Separate the WHERE and the
>         ELSEWHERE evaluations into two loops.
>         (gfc_trans_where): If there is an ELSEWHERE assignment and the
>         mask is not a variable, do not call gfc_trans_where_3.
>
>  2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
>
>         PR fortran/35759
>         * gfortran.dg/where_1.f90: New test.
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
 --Hitchhikers Guide to the Galaxy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]