<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/150745>150745</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] atanh calls with different types causes LLVM IR generation failure
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
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
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVE2PpDYQ_TXFxZqWu4ABDhxIT5CiTBRpDnuNDBS0E2Mjf8zM7q-PbOhJ7-S0WqnVGJtXr169Jwvn5KKJWih_gfIpE8FfjW3_eRDWmjeXDWb62r7QZs0URrKQd8C7q_ebi0vsAfvFTINR_mTsAth_A-xz8bs-v15__Qa8g0e-_-aGA-9cGKwJXmpinpwHrN8BG-AdY1J7srMYKb2xfWMhy-agRy-NZsILfT0gbJB6AqzHA358DHj5IlQgFtvLO_Z-K0Z6-lwonsTt74lvrN8V2KzUngF2gJf7LoB3scJnVf_TifdCLQkFWNdRxU-w4P1045p3fwa_Bb-b9HE0Gu2MiuLIWhMtZMqMgDUgAvZi2wB7ehfrpugUXUKEvDunv3NkzzsGWCn1up5GoRRgxczGzEZW6In5rxuxVbpV-PHKZmM_TviBnB-LiAE8Q_4UN2SOgNV9Q8_mjazUC_OGPT9_-YP99sJmIRVNwLuLUIptwoqVPNmdcDLkmDaeHbQ3Z2OahQ-WIlucKWCZs8irjJjYZMKgCPDCNm_jGY9roeSiWZ1ilGPCFAkT5aYtKPjNkL1Eqrtb8zPt_RjT0X5qsLyDnSPqr95Yb4XupNlj8EJCxcnXh1SMUhMFlsWRqtv891nH6Y-WhCfmr7QbsZoppPBczLpJRZZZ8sFqmiLufB-0bGrzqckbkVF7rsq8RN7wJru2NArRUFFXkximpmqqWlDRYDOL8lxT-ZjJFjmWvMJH3vAam1M153kx41CNTfFY5gQFp1VIdUopNHbJpHOB2nPJq6LMlBhIuXSHIc5K6CWGuHzKbBsBD0NYHBRcSefdfyW89CpdfH1ClE_7vZCG6tib9Fc2yXkmS9onWx0bRXDkPiK6kCYrkrNxgsFSFqxqP92P0l_DcBrNCthH8uPxsFnzN40esE9iHGB_6Hlt8d8AAAD__wNit10">