File tree 2 files changed +10
-4
lines changed 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2575,8 +2575,8 @@ void OmpStructureChecker::CheckCancellationNest(
2575
2575
}
2576
2576
break ;
2577
2577
default :
2578
- // This should have been diagnosed by this point .
2579
- llvm_unreachable ( " Unexpected directive " ) ;
2578
+ // This is diagnosed later .
2579
+ return ;
2580
2580
}
2581
2581
if (!eligibleCancellation) {
2582
2582
context_.Say (source,
@@ -2614,8 +2614,8 @@ void OmpStructureChecker::CheckCancellationNest(
2614
2614
parser::ToUpperCaseLetters (typeName.str ()));
2615
2615
break ;
2616
2616
default :
2617
- // This should have been diagnosed by this point .
2618
- llvm_unreachable ( " Unexpected directive " ) ;
2617
+ // This is diagnosed later .
2618
+ return ;
2619
2619
}
2620
2620
}
2621
2621
}
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