[Patch, fortran] PR80442 Handle DATA statement with iteration var in array slice

Nicolas Koenig koenigni@student.ethz.ch
Sat May 13 23:43:00 GMT 2017


Hello Jerry,

Thanks for the review. Committed as r248012.

Nicolas


On 05/13/2017 06:30 PM, Jerry DeLisle wrote:
> On 05/13/2017 04:56 AM, Nicolas Koenig wrote:
>> Ping
>> Also, attached is a better test case.
>>
>>
>> On 05/09/2017 10:49 PM, Nicolas Koenig wrote:
>>> 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?
> It looks OK and thanks for patch.
>
> Jerry
>
>
>>> 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
>>>
>>>



More information about the Fortran mailing list