File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2119,7 +2119,7 @@ void OmpAttributeVisitor::Post(const parser::OpenMPAllocatorsConstruct &x) {
21192119
21202120static bool IsPrivatizable (const Symbol *sym) {
21212121 auto *misc{sym->detailsIf <MiscDetails>()};
2122- return !IsProcedure (*sym) && !IsNamedConstant (*sym) &&
2122+ return IsVariableName (*sym) && !IsProcedure (*sym) && !IsNamedConstant (*sym) &&
21232123 !semantics::IsAssumedSizeArray (
21242124 *sym) && /* OpenMP 5.2, 5.1.1: Assumed-size arrays are shared*/
21252125 !sym->owner ().IsDerivedType () &&
Original file line number Diff line number Diff line change 1+ ! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols %s | FileCheck %s
2+ ! Test that we do not make a private copy of the critical name
3+
4+ ! CHECK: MainProgram scope: mn
5+ ! CHECK-NEXT: j size=4 offset=0: ObjectEntity type: INTEGER(4)
6+ ! CHECK-NEXT: OtherConstruct scope:
7+ ! CHECK-NEXT: j (OmpPrivate): HostAssoc
8+ ! CHECK-NEXT: k2 (OmpCriticalLock): Unknown
9+ program mn
10+ integer :: j
11+ j= 2
12+ ! $omp parallel default(private)
13+ ! $omp critical(k2)
14+ j= 200
15+ ! $omp end critical(k2)
16+ ! $omp end parallel
17+ end
You can’t perform that action at this time.
0 commit comments