File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 24
24
* The ` if ` clause accepts scalar integer expression in addition to scalar
25
25
logical expression.
26
26
* ` !$acc routine ` directive can be placed at the top level.
27
+ * ` !$acc cache ` directive accepts scalar variable.
Original file line number Diff line number Diff line change @@ -1052,7 +1052,10 @@ static bool IsLastNameArray(const parser::Designator &designator) {
1052
1052
const evaluate::DataRef dataRef{*(name.symbol )};
1053
1053
return common::visit (
1054
1054
common::visitors{
1055
- [](const evaluate::SymbolRef &ref) { return ref->Rank () > 0 ; },
1055
+ [](const evaluate::SymbolRef &ref) {
1056
+ return ref->Rank () > 0 ||
1057
+ ref->GetType ()->category () == DeclTypeSpec::Numeric;
1058
+ },
1056
1059
[](const evaluate::ArrayRef &aref) {
1057
1060
return aref.base ().IsSymbol () ||
1058
1061
aref.base ().GetComponent ().base ().Rank () == 0 ;
Original file line number Diff line number Diff line change @@ -29,15 +29,11 @@ program openacc_cache_validity
29
29
! $acc cache(t%arr)
30
30
! $acc cache(ta(1:2)%arr)
31
31
! $acc cache(ta(1:2)%arr(1:4))
32
-
33
- ! ERROR: Only array element or subarray are allowed in CACHE directive
34
- ! $acc cache(ta(1:2)%s)
35
-
36
- ! ERROR: Only array element or subarray are allowed in CACHE directive
37
32
! $acc cache(i)
33
+ ! $acc cache(t%s)
38
34
39
35
! ERROR: Only array element or subarray are allowed in CACHE directive
40
- ! $acc cache(t%s )
36
+ ! $acc cache(t)
41
37
42
38
! ERROR: Only array element or subarray are allowed in CACHE directive
43
39
! $acc cache(/i/)
You can’t perform that action at this time.
0 commit comments