arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / asynchronous_5.f03
blob88ed2c9d7c9be1c2b81013ad9b9e679b70624f82
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003 -fdump-tree-original" }
4 ! Covers code introduced by the fix to PR fortran/87923.
5 ! The idea is that the variables in a namelist or I/O list used for
6 ! asynchronous I/O will be marked with the asynchronous attribute.
8 ! At this time, "asynchronous" is treated as "volatile" (see trans-decl.c).
9 ! Thus, every variable referenced in an "asynchronous=yes" I/O list
10 ! should obtain the "volatile" specifier in its declaration.
13 implicit none
15 type t
16   character(4) :: comp_async
17 end type
19 type(t) :: dvar_async
20 integer :: ivar_async
21 real :: rvar_async
22 logical :: lvar_async
23 integer :: ivar_noasync
25 namelist /names/ ivar_async, rvar_async, lvar_async
27 open(1, asynchronous="yes")
28 write(1, asynchronous="yes") dvar_async
29 write(1, asynchronous="yes") dvar_async%comp_async
30 read(1, asynchronous="yes", nml=names)
32 open(2, asynchronous="no")
33 read(2, asynchronous="no") ivar_noasync
35 end
37 ! { dg-final { scan-tree-dump "volatile +struct +\[^ \]+ +dvar_async" "original" } }
38 ! { dg-final { scan-tree-dump "volatile +\[^ \]+ +ivar_async" "original" } }
39 ! { dg-final { scan-tree-dump "volatile +\[^ \]+ +rvar_async" "original" } }
40 ! { dg-final { scan-tree-dump "volatile +\[^ \]+ +lvar_async" "original" } }
41 ! { dg-final { scan-tree-dump-not "volatile +\[^ \]+ +ivar_noasync" "original" } }