1 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2 include "cuf-sanity-common"
3 !CHECK: SUBROUTINE atcuf
5 !CHECK: SUBROUTINE cudadefd
8 !CHECK: REAL, ALLOCATABLE, PINNED :: pa(:)
10 !CHECK: ATTRIBUTES(DEVICE) SUBROUTINE devicesub
11 !CHECK: END SUBROUTINE
12 !CHECK: ATTRIBUTES(DEVICE) REAL FUNCTION devicefunc()
13 !CHECK: devicefunc=1._4
15 !CHECK: ATTRIBUTES(GLOBAL) SUBROUTINE globalsub
16 !CHECK: END SUBROUTINE
17 !CHECK: ATTRIBUTES(GRID_GLOBAL) SUBROUTINE gridglobalsub
18 !CHECK: END SUBROUTINE
19 !CHECK: ATTRIBUTES(HOST) SUBROUTINE hostsub
20 !CHECK: END SUBROUTINE
21 !CHECK: ATTRIBUTES(GLOBAL) LAUNCH_BOUNDS(1_4, 2_4) SUBROUTINE lbsub
22 !CHECK: END SUBROUTINE
23 !CHECK: ATTRIBUTES(GLOBAL) CLUSTER_DIMS(1_4, 2_4, 3_4) SUBROUTINE cdsub
24 !CHECK: END SUBROUTINE
25 !CHECK: ATTRIBUTES(DEVICE) SUBROUTINE attrs
26 !CHECK: ATTRIBUTES(DEVICE) devx1
27 !CHECK: REAL, DEVICE :: devx2
28 !CHECK: END SUBROUTINE
29 !CHECK: SUBROUTINE test
30 !CHECK: LOGICAL ispinned
31 !CHECK: !$CUF KERNEL DO (1_4) <<<*,*,STREAM=1_4>>>
34 !CHECK: !$CUF KERNEL DO <<<1_4,(2_4,3_4),STREAM=1_4>>>
37 !CHECK: !$CUF KERNEL DO <<<*,*>>> REDUCE(+:x,y) REDUCE(*:z)
39 !CHECK: x=x+a(int(j,kind=8))
40 !CHECK: y=y+a(int(j,kind=8))
41 !CHECK: z=z*a(int(j,kind=8))
43 !CHECK: CALL globalsub<<<1_4,2_4>>>()
44 !CHECK: CALL globalsub<<<1_4,2_4,3_4>>>()
45 !CHECK: CALL globalsub<<<1_4,2_4,3_4,4_4>>>()
46 !CHECK: CALL globalsub<<<-1_4,5_4>>>()
47 !CHECK: ALLOCATE(pa(32_4), PINNED=ispinned)
48 !CHECK: END SUBROUTINE