1 ! Test that $dir loop directives (known or unknown) are not clashing
4 ! RUN: %flang_fc1 -fopenacc -emit-hlfir %s -o - | FileCheck %s
6 subroutine test_before_acc_loop(a
, b
, c
)
7 real, dimension(10) :: a
,b
,c
8 !dir$ myloop_directive_1
9 !dir$ myloop_directive_2
15 ! CHECK-LABEL: test_before_acc_loop
18 subroutine test_after_acc_loop(a
, b
, c
)
19 real, dimension(10) :: a
,b
,c
21 !dir$ myloop_directive_1
22 !dir$ myloop_directive_2
27 ! CHECK-LABEL: test_after_acc_loop
30 subroutine test_before_acc_combined(a
, b
, c
)
31 real, dimension(10) :: a
,b
,c
32 !dir$ myloop_directive_1
33 !dir$ myloop_directive_2
39 ! CHECK-LABEL: test_before_acc_combined
40 ! CHECK: acc.parallel combined(loop)
42 subroutine test_after_acc_combined(a
, b
, c
)
43 real, dimension(10) :: a
,b
,c
45 !dir$ myloop_directive_1
46 !dir$ myloop_directive_2
51 ! CHECK-LABEL: test_after_acc_combined
52 ! CHECK: acc.parallel combined(loop)
55 subroutine test_vector_always_after_acc(a
, b
, c
)
56 real, dimension(10) :: a
,b
,c
63 ! CHECK-LABEL: test_vector_always_after_acc
66 subroutine test_vector_always_before_acc(a
, b
, c
)
67 real, dimension(10) :: a
,b
,c
74 ! CHECK-LABEL: test_vector_always_before_acc