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 2424* The ` if ` clause accepts scalar integer expression in addition to scalar
2525 logical expression.
2626* ` !$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) {
10521052 const evaluate::DataRef dataRef{*(name.symbol )};
10531053 return common::visit (
10541054 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+ },
10561059 [](const evaluate::ArrayRef &aref) {
10571060 return aref.base ().IsSymbol () ||
10581061 aref.base ().GetComponent ().base ().Rank () == 0 ;
Original file line number Diff line number Diff line change @@ -29,15 +29,11 @@ program openacc_cache_validity
2929 ! $acc cache(t%arr)
3030 ! $acc cache(ta(1:2)%arr)
3131 ! $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
3732 ! $acc cache(i)
33+ ! $acc cache(t%s)
3834
3935 ! ERROR: Only array element or subarray are allowed in CACHE directive
40- ! $acc cache(t%s )
36+ ! $acc cache(t)
4137
4238 ! ERROR: Only array element or subarray are allowed in CACHE directive
4339 ! $acc cache(/i/)
You can’t perform that action at this time.
0 commit comments