Issue |
150745
|
Summary |
[Flang] atanh calls with different types causes LLVM IR generation failure
|
Labels |
flang
|
Assignees |
|
Reporter |
k-arrows
|
Reproducer:
https://godbolt.org/z/3aKn1vhEz
```f90
subroutine test(x)
interface
integer function atanh(x) bind(c)
integer,Value :: x
end function atanh
end interface
integer :: x
print *,atanh(x)
end subroutine test
subroutine test2(x)
real(8) :: x
print *,atanh(x)
end subroutine test2
```
Output:
```console
error: loc("/app/example.f90":12:11): 'llvm.call' op operand type mismatch for operand 0: 'f64' != 'i32'
error: Lowering to LLVM IR failed
Call parameter type does not match function signature!
%3 = load double, ptr %0, align 8
i32 %4 = call i32 @atanh(double %3)
Call parameter type does not match function signature!
%4 = call i32 @atanh(double %3)
double %5 = call i1 @_FortranAioOutputReal64(ptr %2, i32 %4)
error: failed to create the LLVM module
Compiler returned: 1
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs