2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / volatile9.f90
blob41be085c54d50f26cdbea89e3396a390c2ecf1fa
1 ! Check for valid VOLATILE uses
3 ! Contributed by Steven Correll.
5 ! PR fortran/30520
7 ! { dg-do compile }
9 function f() result(fr)
10 integer, volatile :: fr
11 fr = 5
12 end function f
14 module mod13
15 implicit none
16 integer :: v13
17 end module mod13
19 module mod13a
20 use mod13
21 implicit none
22 volatile :: v13
23 real :: v14
24 contains
25 subroutine s13()
26 volatile :: v13
27 volatile :: v14
28 end subroutine s13
29 end module mod13a
31 module mod13b
32 use mod13a
33 implicit none
34 volatile :: v13
35 end module mod13b
38 subroutine s14()
39 use mod13a
40 implicit none
41 volatile :: v13
42 end subroutine s14