Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/implied_do_io_4.f90 @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 ! { dg-do run } | |
2 ! { dg-additional-options "-ffrontend-optimize -fdump-tree-original" } | |
3 ! PR fortran/35339 - make sure that I/O of an implied DO loop | |
4 ! of allocatable character arrays a) works and b) is converted | |
5 ! to a transfer_array | |
6 program main | |
7 implicit none | |
8 integer:: i | |
9 integer, parameter:: N = 10 | |
10 character(len=:), dimension(:),allocatable:: ca | |
11 allocate(character(len=N):: ca(3)) | |
12 open(unit=10,status="scratch") | |
13 ca(1) = "foo" | |
14 ca(2) = "bar" | |
15 ca(3) = "xyzzy" | |
16 write (10, '(3A10)') (ca(i),i=1,3) | |
17 rewind (10) | |
18 ca(:) = '' | |
19 read (10, '(3A10)') (ca(i),i=1,3) | |
20 if (ca(1) /= 'foo' .or. ca(2) /= 'bar' .or. ca(3) /= 'xyzzy') call abort | |
21 end program | |
22 ! { dg-final { scan-tree-dump-times "_gfortran_transfer_array" 2 "original" } } |