[Patch, fortran] PR35339 Optimize implied do loops in io statements

Nicolas Koenig koenigni@student.ethz.ch
Wed May 31 23:15:00 GMT 2017


Hello Dominique,

attached is the next try, this time without stupidities (I hope). Both 
test cases you posted don't ICE anymore.

Ok for trunk?

Nicolas

Regression tested for x86_64-pc-linux-gnu.

Changelog (still the same):
2017-05-27  Nicolas Koenig  <koenigni@student.ethz.ch>

         PR fortran/35339
         * frontend-passes.c (traverse_io_block): New function.
         (simplify_io_impl_do): New function.
         (optimize_namespace): Invoke gfc_code_walker with
         simplify_io_impl_do.

2017-05-27  Nicolas Koenig  <koenigni@student.ethz.ch>

         PR fortran/35339
         * gfortran.dg/implied_do_io_1.f90: New Test.

On 05/31/2017 05:49 PM, Dominique d'Humières wrote:
>> Le 31 mai 2017 à 17:40, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :
>>
>> If I am not mistaken, compiling the following code with the patch applied
> simpler test
>
>    print *,(huge(0),i=1,6)
> !  print*,(i,i=1,6)
> !  print*,(i,i=10000,60000,10000)
>    end
>
>> gives an ICE.
>>
>> TIA
>>
>> Dominique

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p8.diff
Type: text/x-patch
Size: 7691 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170531/1cc4ee10/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implied_do_io_1.f90
Type: text/x-fortran
Size: 1744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170531/1cc4ee10/attachment-0001.bin>


More information about the Fortran mailing list