[Patch, fortran] PR80442 Handle DATA statement with iteration var in array slice
Nicolas Koenig
koenigni@student.ethz.ch
Tue May 9 20:49:00 GMT 2017
Hello everyone,
since everybody seems to be submitting patches the last few days, I
thought I might as well :)
Attached is a patch that makes the compiler capable of dealing with
implied do variables in
array slices in data statements.
The copying of the expressions is necessary since
gfc_simplify_expr(expr, 1) substitutes every
symbol in expr that is on the iter_stack with its value.
Ok for trunk?
Nicolas
Regression tested for x86_64-pc-linux-gnu.
Changelog:
2017-05-09 Nicolas Koenig <koenigni@student.ethz.ch>
PR fortran/80442
* array.c (gfc_ref_dimen_size): Simplify stride
expression
* data.c (gfc_advance_section): Simplify start,
end and stride expressions
(gfc_advance_section): Simplify start and end
expressions
(gfc_get_section_index): Simplify start expression
2017-05-09 Nicolas Koenig <koenigni@student.ethz.ch>
PR fortran/80442
* gfortran.dg/impl_do_var_data.f90: New Test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p3.diff
Type: text/x-patch
Size: 3952 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170509/923f8b9b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: impl_do_var_data.f90
Type: text/x-fortran
Size: 213 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170509/923f8b9b/attachment-0001.bin>
More information about the Fortran
mailing list