[Patch, fortran] PR35339 Optimize implied do loops in io statements
Nicolas Koenig
koenigni@student.ethz.ch
Thu Jun 1 18:26:00 GMT 2017
Hello Dominique,
it appears the problem with this test case is that it fails because of
another bug (see PR80945
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80945), that is triggered
in this test case by the patch. What is normally done in such a case?
Should I add a check for this special case or just wait until the bug is
fixed?
Thanks for your patience & help!
Nicolas
On 06/01/2017 04:37 PM, Dominique d'Humières wrote:
>> Le 1 juin 2017 à 16:19, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :
>>
>> I see
>>
>> FAIL: gfortran.dg/deferred_character_2.f90 -O1 execution test
>> FAIL: gfortran.dg/deferred_character_2.f90 -O2 execution test
>> FAIL: gfortran.dg/deferred_character_2.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test
>> FAIL: gfortran.dg/deferred_character_2.f90 -O3 -g execution test
>> FAIL: gfortran.dg/deferred_character_2.f90 -Os execution test
>>
>> Dominique
> Reduced test
>
> PROGRAM hello
>
> IMPLICIT NONE
>
> CHARACTER(LEN=:),DIMENSION(:),ALLOCATABLE :: array_lineas
> CHARACTER(LEN=:),DIMENSION(:),ALLOCATABLE :: array_copia
> character (3), dimension (2) :: array_fijo = ["abc","def"]
> character (100) :: buffer
> INTEGER :: largo , cant_lineas , i
>
> write (buffer, "(2a3)") array_fijo
>
> largo = LEN (array_fijo)
>
> cant_lineas = size (array_fijo, 1)
>
> ALLOCATE(CHARACTER(LEN=largo) :: array_lineas(cant_lineas))
>
> READ(buffer,"(2a3)") (array_lineas(i),i=1,cant_lineas)
>
> print *, array_lineas
> print *, array_fijo
> if (any (array_lineas .ne. array_fijo)) call abort
>
> END PROGRAM
>
> Dominique
>
More information about the Fortran
mailing list