Issue |
145219
|
Summary |
[Flang][OpenMP] reduction on logical array causes LLVM IR type mismatch
|
Labels |
flang:openmp
|
Assignees |
|
Reporter |
k-arrows
|
Reproducer:
https://godbolt.org/z/MM1hjbEjr
```f90
logical :: l1, l2(2)
!$omp parallel reduction (.and.:l1, l2)
l1 = .false.
l2(2) = .false.
!$omp end parallel
end
```
```console
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
Intrinsic has incorrect argument type!
ptr @llvm.memcpy.p0.i32.i32
Both operands to ICmp instruction are not of the same type!
%28 = icmp ne ptr %1, i32 0
error: failed to create the LLVM module
Compiler returned: 1
```
With assertion-enabled flang, compiling the above reproducer results in the following assertion failure:
```txt
llvm-project/llvm/include/llvm/IR/Instructions.h:1182: void llvm::ICmpInst::AssertOK(): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!"' failed.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs