File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2109,8 +2109,13 @@ void OmpAttributeVisitor::Post(const parser::Name &name) {
21092109 dirContext.defaultDSA == Symbol::Flag::OmpShared) {
21102110 // 1) default
21112111 // Allowed only with parallel, teams and task generating constructs.
2112- assert (parallelDir || taskGenDir ||
2113- llvm::omp::allTeamsSet.test (dirContext.directive ));
2112+ if (!(parallelDir || taskGenDir ||
2113+ llvm::omp::allTeamsSet.test (dirContext.directive )))
2114+ context_.Say (dirContext.directiveSource ,
2115+ " %s directive cannot have default clause" _err_en_US,
2116+ parser::ToUpperCaseLetters (
2117+ llvm::omp::getOpenMPDirectiveName (dirContext.directive )
2118+ .str ()));
21142119 if (dirContext.defaultDSA != Symbol::Flag::OmpShared)
21152120 declNewSymbol (dirContext.defaultDSA );
21162121 else
You can’t perform that action at this time.
0 commit comments