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) {
2109
2109
dirContext.defaultDSA == Symbol::Flag::OmpShared) {
2110
2110
// 1) default
2111
2111
// 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 ()));
2114
2119
if (dirContext.defaultDSA != Symbol::Flag::OmpShared)
2115
2120
declNewSymbol (dirContext.defaultDSA );
2116
2121
else
You can’t perform that action at this time.
0 commit comments