[patch, fortran] Fix PR 100227, write with implied DO loop
Thomas Koenig
tkoenig@netcologne.de
Sun Jul 4 16:09:51 GMT 2021
Hello world,
after a bit of an absence, I am now back, at least for some regression
fixing (and for reviewing patches, if that is called for).
So, here's a regression fix to start with.
OK for trunk and affected branches (down to 9)?
Best regards
Thomas
Do not replace variable op variable in I/O implied DO loop replacement.
This PR came about because index expressions of the form k+k in
implied DO loops in I/O statements were considered for replacement
by array slices.
Fixed by only doing the transformation if the expression is of the
type expr OP contastant.
gcc/fortran/ChangeLog:
PR fortran/100227
* frontend-passes.c (traverse_io_block): Adjust test for
when a variable is eligible for the transformation to
array slice.
gcc/testsuite/ChangeLog:
PR fortran/100227
* gfortran.dg/implied_do_io_7.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210704/3e702287/attachment-0001.bin>
More information about the Gcc-patches
mailing list