File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2575,8 +2575,8 @@ void OmpStructureChecker::CheckCancellationNest(
25752575 }
25762576 break ;
25772577 default :
2578- // This should have been diagnosed by this point .
2579- llvm_unreachable ( " Unexpected directive " ) ;
2578+ // This is diagnosed later .
2579+ return ;
25802580 }
25812581 if (!eligibleCancellation) {
25822582 context_.Say (source,
@@ -2614,8 +2614,8 @@ void OmpStructureChecker::CheckCancellationNest(
26142614 parser::ToUpperCaseLetters (typeName.str ()));
26152615 break ;
26162616 default :
2617- // This should have been diagnosed by this point .
2618- llvm_unreachable ( " Unexpected directive " ) ;
2617+ // This is diagnosed later .
2618+ return ;
26192619 }
26202620 }
26212621}
Original file line number Diff line number Diff line change 1+ ! RUN: %python %S/../test_errors.py %s %flang_fc1 %openmp_flags
2+
3+ program test
4+ ! ERROR: PARALLEL DO is not a cancellable construct
5+ ! $omp cancel parallel do
6+ end
You can’t perform that action at this time.
0 commit comments