This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR35339 Optimize implied do loops in io statements
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Nicolas Koenig <koenigni at student dot ethz dot ch>
- Cc: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 1 Jun 2017 16:37:04 +0200
- Subject: Re: [Patch, fortran] PR35339 Optimize implied do loops in io statements
- Authentication-results: sourceware.org; auth=none
- References: <92F638BD-768E-4C83-9BA9-0FACFC7F6C07@lps.ens.fr> <53722520-52ae-0fa7-d732-f30995c9f93a@student.ethz.ch> <BA409A07-2700-4F8C-B8EA-6093D1B7C4F4@gmail.com> <A6B37DB3-F797-4B44-BCBF-E7AB83BFC11F@lps.ens.fr> <638D5570-F9B9-4522-A123-CDC0B95D4227@lps.ens.fr> <84e2e0b8-26d2-bf0c-35ae-dd8f63a111fe@student.ethz.ch> <ADF94D00-F826-4741-9A5D-C01BB485F768@lps.ens.fr> <28B2EA4E-59C0-4E78-B04B-ECAD49EB614B@lps.ens.fr>
> 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