Handle EXEC_IOLENGTH in doloop_contained_procedure_code.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 15 Mar 2021 10:02:02 +0000 (11:02 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 15 Mar 2021 10:02:02 +0000 (11:02 +0100)
commit52654036a544389fb66855bf3972f2a8013bec59
treebd9f117090f37428ece4467884680b1efa3f1374
parent21ced2776a117924e52f6aab8b41afb613fef0e7
Handle EXEC_IOLENGTH in doloop_contained_procedure_code.

This rather obvious patch fixes an ICE on valid which came about
because I did not handle EXEC_IOLENGTH as start of an I/O statement
when checking for the DO loop variable.  This is an 11 regression.

gcc/fortran/ChangeLog:

PR fortran/99345
* frontend-passes.c (doloop_contained_procedure_code):
Properly handle EXEC_IOLENGTH.

gcc/testsuite/ChangeLog:

PR fortran/99345
* gfortran.dg/do_check_16.f90: New test.
* gfortran.dg/do_check_17.f90: New test.
gcc/fortran/frontend-passes.c
gcc/testsuite/gfortran.dg/do_check_16.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/do_check_17.f90 [new file with mode: 0644]