[patch, fortran] Fix for PR 60522

Thomas Koenig tkoenig@netcologne.de
Sun Mar 16 10:41:00 GMT 2014


Hello world,

the attached patch fixes PR 60522, a regresseion where temporary
variables were incorrectly introduced in a BLOCK within a WHERE
statement.

Regression-tested on x86_64-unknown-linux-gnu.

OK for trunk and the other open branches?

	Thomas

2014-04-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/60522
        * frontend-passes.c (top level): New variables where_level
        and where_code.
        (optimize_code):  Set where_code if we are within a
        WHERE statment.
        (cfe_code):  Likewise.
        (create_var):  Use where_code if within a WHERE statement.
        (optimize_namespace):  Set where_level.
        (gfc_code_walker):  Keep track of where_level.

2014-04-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/60522
        * gfortran.dg/where_4.f90:  New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: where_4.f90
Type: text/x-fortran
Size: 645 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140316/883e2141/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p5.diff
Type: text/x-patch
Size: 3533 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140316/883e2141/attachment-0001.bin>


More information about the Fortran mailing list