PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / asynchronous_1.f90
blobbc8821453efe1bb6d7764c5f7982c885b7c91f46
1 ! { dg-do compile }
3 ! PR/fortran 25829
5 ! Check parsing and checking of ASYNCHRONOUS
7 type(t) function func0()
8 asynchronous :: a
9 integer, asynchronous:: b
10 allocatable :: c
11 volatile :: d
12 type t
13 sequence
14 integer :: i = 5
15 end type t
16 end function func0
18 integer function func()
19 asynchronous :: func
20 integer, asynchronous:: b
21 allocatable :: c
22 volatile :: func
23 type t
24 sequence
25 integer :: i = 5
26 end type t
27 end function func
29 function func2() result(res)
30 volatile res
31 asynchronous res
32 end function func2
34 subroutine sub()
35 asynchronous sub ! { dg-error "SUBROUTINE attribute conflicts with ASYNCHRONOUS" }
36 volatile sub ! { dg-error "SUBROUTINE attribute conflicts with VOLATILE" }
37 end subroutine sub
39 program main
40 asynchronous main ! { dg-error "PROGRAM attribute conflicts with ASYNCHRONOUS" }
41 volatile main ! { dg-error "PROGRAM attribute conflicts with VOLATILE" }
42 end program main