Description
Reproducer:
!$omp parallel sections
!$omp section
do i = 1, 2
end do
!$omp section
do i = 1, 2
end do
!$omp end parallel sections
end
With assertion-disabled flang, the following output is obtained:
https://godbolt.org/z/GbfW7vYKj
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
error: loc("/app/example.f90":6:5): operand #1 does not dominate this use
error: verification of lowering to FIR failed
Compiler returned: 1
With assertion-enabled flang, the reproducer hits the following assertion:
flang: /path_to_project/llvm-project/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp:152: void Fortran::lower::omp::DataSharingProcessor::cloneSymbol(const semantics::Symbol *): Assertion `success && "Privatization failed due to existing binding"' failed.