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(
21522152 dirContext.defaultDSA == Symbol::Flag::OmpShared) {
21532153 // 1) default
21542154 // Allowed only with parallel, teams and task generating constructs.
2155- assert (parallelDir || taskGenDir || teamsDir);
2155+ if (!parallelDir && !taskGenDir && !teamsDir) {
2156+ return ;
2157+ }
21562158 if (dirContext.defaultDSA != Symbol::Flag::OmpShared)
21572159 makePrivateSymbol (dirContext.defaultDSA );
21582160 else
Original file line number Diff line number Diff line change @@ -31,4 +31,13 @@ program omp_default
3131 end do
3232 ! $omp end teams
3333
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+
3443end program omp_default
You can’t perform that action at this time.
0 commit comments