Discussion:
[patch, fortran] Fix PR 86837, wrong code regression in implied do loop in i/o
Thomas König
2018-08-23 20:12:09 UTC
Permalink
Hello world,

this patch fixes a regression by correctly checking that
the innner start, step or end values of an implied do
loop do not depend on an outer loop variable.

The check was actually done before, but gfc_check_dependency
wasn't finding all relevant cases.

Regression-tested. OK for trunk and 8.x?

Regards

Thomas

2018-08-23 Thomas Koenig <***@gcc.gnu.org>

PR fortran/86837
* frontend-passes.c (var_in_expr_callback): New function.
(var_in_expr): New function.
(traverse_io_block): Use var_in_expr instead of
gfc_check_dependency for checking if the variable depends on the
previous interators.

2018-08-23 Thomas Koenig <***@gcc.gnu.org>

PR fortran/86837
* gfortran.dg/implied_do_io_6.f90: New test.
Jerry DeLisle
2018-08-24 02:35:46 UTC
Permalink
Post by Thomas König
Hello world,
this patch fixes a regression by correctly checking that
the innner start, step or end values of an implied do
loop do not depend on an outer loop variable.
The check was actually done before, but gfc_check_dependency
wasn't finding all relevant cases.
Regression-tested. OK for trunk and 8.x?
Regards
    Thomas
Very OK Thomas.

Thanks for patch.

Jerry

Loading...