Issue |
138224
|
Summary |
[Flang][OpenMP] Flang crashes on invalid OpenMP directive "omp sections parallel"
|
Labels |
flang
|
Assignees |
|
Reporter |
k-arrows
|
When compiling the following Fortran code with Flang, the compiler crashes.
This code is intentionally invalid and should trigger a syntax error, but instead, Flang crashes.
This reproducer was generated by ChatGPT.
https://godbolt.org/z/s59av95EY
```f90
!$omp sections parallel
!$omp section
x = x + 1
!$omp end sections
end
```
With assertion-enabled flang, I got the following assertion failure:
```txt
flang: /path_to_project/llvm-project/flang/lib/Lower/OpenMP/Decomposer.cpp:87: Fortran::lower::omp::ConstructQueue Fortran::lower::omp::buildConstructQueue(mlir::ModuleOp, Fortran::semantics::SemanticsContext &, Fortran::lower::pft::Evaluation &, const parser::CharBlock &, llvm::omp::Directive, const List<Fortran::lower::omp::Clause> &): Assertion `!decompose.output.empty() && "Construct decomposition failed"' failed.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs