Skip to content

[Flang][OpenMP] compilation failed with "Basic Block in function '_QQmain' does not have terminator!" #138436

@k-arrows

Description

@k-arrows

Reproducible on Godbolt:
https://godbolt.org/z/zMjo7ajYv

!$omp parallel
!$omp cancel parallel
!$omp barrier
!$omp end parallel
end

Activity

added
flangFlang issues not falling into any other category
on May 4, 2025
added and removed
flangFlang issues not falling into any other category
on May 4, 2025
k-arrows

k-arrows commented on May 4, 2025

@k-arrows
Author

With assertion-enabled flang, the following output is obtained:

flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
Basic Block in function '_QQmain' does not have terminator!
label %omp.par.region1.split.cont
While deleting: label %omp.par.region1.split.cont
Use still stuck around after Def is destroyed:  br i1 %5, label %omp.par.region1.split.cont, label %omp.par.region1.split.cncl
Uses remain when a value is destroyed!
UNREACHABLE executed at /path_to_project/llvm-project/llvm/lib/IR/Value.cpp:102!
self-assigned this
on May 20, 2025
added a commit that references this issue on Jun 5, 2025
0ae58c6
added a commit that references this issue on Jun 6, 2025
b03081e
added theissue type on Jun 6, 2025
added a commit that references this issue on Jun 11, 2025
9e2445e
added a commit that references this issue on Jun 12, 2025
a635832
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    [Flang][OpenMP] compilation failed with "Basic Block in function '_QQmain' does not have terminator!" · Issue #138436 · llvm/llvm-project