Skip to content

Commit a04846b

Browse files
vdonaldsonjeanPerier
authored andcommitted
Fix #493 - reading from a default unit (#521)
1 parent 96407a8 commit a04846b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

flang/test/Lower/io-stmt02.f90

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,15 @@ subroutine control1(n) ! I/O condition specifier control flow
8080
dimension c(n), d(n,n), e(n,n), f(n)
8181
read(*,'(F7.2)', iostat=mm, advance='no') a, b, (c(j), (d(k,j), e(k,j), k=1,n), f(j), j=1,n), g
8282
end
83+
84+
! CHECK-LABEL: func @_QPimpliedformat
85+
subroutine impliedformat
86+
! CHECK: BeginExternalListInput(%c-1
87+
! CHECK: InputReal32
88+
! CHECK: EndIoStatement(%3) : (!fir.ref<i8>) -> i32
89+
read*, x
90+
! CHECK: BeginExternalListOutput(%c-1
91+
! CHECK: OutputReal32
92+
! CHECK: EndIoStatement
93+
print*, x
94+
end

0 commit comments

Comments
 (0)