| Issue |
178613
|
| Summary |
[Flang] Lowering failure in Flang for repeated BLOCK-scoped variables in OpenMP
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
ShashwathiNavada
|
Variables declared inside block constructs are local to that block, and reusing the same variable name in different blocks is valid. However, when multiple block constructs inside an OpenMP parallel region declare and use the same variable name, Flang aborts with a “lowering not yet implemented” error.
The test case passes successfully with gfortran and ifx.
Reproducer:
```
subroutine foo()
integer :: i
!$omp parallel
block
block
integer :: bbb
bbb = 1
end block
block
integer :: bbb
bbb = 2
end block
end block
!$omp end parallel
end subroutine
```
Error:
```
>> ./install/bin/flang test.f90 -c -fopenmp
>> bbb (OmpShared): HostAssoc => bbb size=4 offset=0: ObjectEntity type: INTEGER(4)
error: loc("llvm-project/test.f90":11:9): llvm-project/flang/lib/Lower/ConvertExprToHLFIR.cpp:360: not yet implemented: lowering symbol to HLFIR
LLVM ERROR: aborting
```
[https://godbolt.org/z/q5Ezcs1GW](https://godbolt.org/z/q5Ezcs1GW
)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs