File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2052,6 +2052,8 @@ void OmpAttributeVisitor::Post(const parser::OpenMPAllocatorsConstruct &x) {
2052
2052
static bool IsPrivatizable (const Symbol *sym) {
2053
2053
auto *misc{sym->detailsIf <MiscDetails>()};
2054
2054
return !IsProcedure (*sym) && !IsNamedConstant (*sym) &&
2055
+ !semantics::IsAssumedSizeArray (
2056
+ *sym) && /* OpenMP 5.2, 5.1.1: Assumed-size arrays are shared*/
2055
2057
!sym->owner ().IsDerivedType () &&
2056
2058
sym->owner ().kind () != Scope::Kind::ImpliedDos &&
2057
2059
!sym->detailsIf <semantics::AssocEntityDetails>() &&
Original file line number Diff line number Diff line change @@ -47,3 +47,14 @@ subroutine sb4
47
47
end do loop
48
48
! $omp end parallel
49
49
end subroutine
50
+
51
+ ! Test that default(none) does not error for assumed-size array
52
+ subroutine sub ( aaa )
53
+ real ,dimension (* ),intent (in ):: aaa
54
+ integer :: ip
55
+ real :: ccc
56
+ ! $omp parallel do private(ip,ccc) default(none)
57
+ do ip = 1 , 10
58
+ ccc= aaa(ip)
59
+ end do
60
+ end subroutine sub
You can’t perform that action at this time.
0 commit comments