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) {
20522052static bool IsPrivatizable (const Symbol *sym) {
20532053 auto *misc{sym->detailsIf <MiscDetails>()};
20542054 return !IsProcedure (*sym) && !IsNamedConstant (*sym) &&
2055+ !semantics::IsAssumedSizeArray (
2056+ *sym) && /* OpenMP 5.2, 5.1.1: Assumed-size arrays are shared*/
20552057 !sym->owner ().IsDerivedType () &&
20562058 sym->owner ().kind () != Scope::Kind::ImpliedDos &&
20572059 !sym->detailsIf <semantics::AssocEntityDetails>() &&
Original file line number Diff line number Diff line change @@ -47,3 +47,14 @@ subroutine sb4
4747 end do loop
4848 ! $omp end parallel
4949end 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