File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2152,7 +2152,9 @@ void OmpAttributeVisitor::CreateImplicitSymbols(
2152
2152
dirContext.defaultDSA == Symbol::Flag::OmpShared) {
2153
2153
// 1) default
2154
2154
// Allowed only with parallel, teams and task generating constructs.
2155
- assert (parallelDir || taskGenDir || teamsDir);
2155
+ if (!parallelDir && !taskGenDir && !teamsDir) {
2156
+ return ;
2157
+ }
2156
2158
if (dirContext.defaultDSA != Symbol::Flag::OmpShared)
2157
2159
makePrivateSymbol (dirContext.defaultDSA );
2158
2160
else
Original file line number Diff line number Diff line change @@ -31,4 +31,13 @@ program omp_default
31
31
end do
32
32
! $omp end teams
33
33
34
+ ! $omp parallel
35
+ ! ERROR: DEFAULT clause is not allowed on the DO directive
36
+ ! $omp do default(private)
37
+ do i = 1 , 10
38
+ k = i
39
+ end do
40
+ ! $omp end do
41
+ ! $omp end parallel
42
+
34
43
end program omp_default
You can’t perform that action at this time.
0 commit comments