Skip to content

Commit 501f4d7

Browse files
Updated the test with a_common defined with more variables in a different module
1 parent 132af7a commit 501f4d7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

flang/test/Semantics/OpenACC/acc-common.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ module acc_common_decl
77
data a/42/
88
end module acc_common_decl
99

10+
module acc_common_another
11+
implicit none
12+
integer c, d
13+
common /a_common/ c, d
14+
!$acc declare create (/a_common/)
15+
end module acc_common_another
16+
1017
module acc_common_intermediate
1118
use acc_common_decl
1219
implicit none
@@ -17,6 +24,7 @@ end module acc_common_intermediate
1724

1825
program acc_decl_test
1926
use acc_common_intermediate
27+
use acc_common_another
2028
implicit none
2129

2230
a = 1
@@ -25,6 +33,9 @@ program acc_decl_test
2533
a = 2
2634
!$acc update device (/b_common/)
2735
b = 20
36+
!$acc update device (/a_common/)
37+
c = 3
38+
d = 30
2839
!ERROR: Could not find COMMON block 'a_common_bad' used in OpenACC directive
2940
!$acc update device (/a_common_bad/)
3041
end program

0 commit comments

Comments
 (0)