File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -370,9 +370,12 @@ getScheduleModifiers(const Fortran::parser::OmpScheduleClause &x) {
370
370
const auto &modType2 = std::get<
371
371
std::optional<Fortran::parser::OmpScheduleModifier::Modifier2>>(
372
372
modifier->t );
373
- if (modType2->v .v !=
374
- Fortran::parser::OmpScheduleModifierType::ModType::Simd)
373
+ if (modType2 &&
374
+ modType2->v .v !=
375
+ Fortran::parser::OmpScheduleModifierType::ModType::Simd)
375
376
return translateModifier (modType2->v );
377
+
378
+ return mlir::omp::ScheduleModifier::none;
376
379
}
377
380
378
381
return translateModifier (modType1.v );
@@ -396,8 +399,8 @@ getSIMDModifier(const Fortran::parser::OmpScheduleClause &x) {
396
399
const auto &modType2 = std::get<
397
400
std::optional<Fortran::parser::OmpScheduleModifier::Modifier2>>(
398
401
modifier->t );
399
- if (modType2->v .v ==
400
- Fortran::parser::OmpScheduleModifierType::ModType::Simd)
402
+ if (modType2 && modType2 ->v .v ==
403
+ Fortran::parser::OmpScheduleModifierType::ModType::Simd)
401
404
return mlir::omp::ScheduleModifier::simd;
402
405
}
403
406
return mlir::omp::ScheduleModifier::none;
You can’t perform that action at this time.
0 commit comments