File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -9375,8 +9375,7 @@ void ResolveNamesVisitor::CreateGeneric(const parser::GenericSpec &x) {
9375
9375
static void SetImplicitCUDADevice (bool inDeviceSubprogram, Symbol &symbol) {
9376
9376
if (inDeviceSubprogram && symbol.has <ObjectEntityDetails>()) {
9377
9377
auto *object{symbol.detailsIf <ObjectEntityDetails>()};
9378
- if (!object->cudaDataAttr () && !IsValue (symbol) &&
9379
- !IsFunctionResult (symbol)) {
9378
+ if (!object->cudaDataAttr () && !IsFunctionResult (symbol)) {
9380
9379
// Implicitly set device attribute if none is set in device context.
9381
9380
object->set_cudaDataAttr (common::CUDADataAttr::Device);
9382
9381
}
Original file line number Diff line number Diff line change 1
1
! RUN: %python %S/test_errors.py %s %flang_fc1
2
- ! Test generic matching with scalars argument without device attr
2
+ ! Test generic matching with scalars argument and argument
3
+ ! with VALUE attribute without DEVICE attr inside device routine
3
4
4
5
module mlocModule
5
6
interface maxlocUpdate
@@ -9,19 +10,22 @@ module mlocModule
9
10
end interface maxlocUpdate
10
11
contains
11
12
12
- attributes(global) subroutine maxlocPartialMaskR_32F1D()
13
+ attributes(global) subroutine maxlocPartialMaskR_32F1D(back )
13
14
implicit none
15
+ logical, intent(in), value :: back
14
16
real(4) :: mval
15
17
16
- call maxlocUpdate(mval)
18
+ call maxlocUpdate(mval, back )
17
19
18
20
end subroutine maxlocPartialMaskR_32F1D
19
21
20
- attributes(device) subroutine maxlocUpdateR_32F(mval)
22
+ attributes(device) subroutine maxlocUpdateR_32F(mval, back )
21
23
real(4) :: mval
24
+ logical :: back
22
25
end subroutine maxlocUpdateR_32F
23
26
24
- attributes(device) subroutine maxlocUpdateR_64F(mval)
27
+ attributes(device) subroutine maxlocUpdateR_64F(mval, back )
25
28
real(8) :: mval
29
+ logical :: back
26
30
end subroutine maxlocUpdateR_64F
27
31
end module
Original file line number Diff line number Diff line change 33
33
!contains
34
34
!attributes(global) subroutine globsub(x,y,z)
35
35
!real(4),value::x
36
+ !attributes(device)x
36
37
!real(4)::y
37
38
!attributes(device) y
38
39
!real(4)::z
You can’t perform that action at this time.
0 commit comments