<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59104>59104</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Link error of ASIN intrinsic function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
Version of flang-new : 16.0.0(e0fb01e97b6b7d2fe66b17b36eeb98aa78c6e3bb)
```
`ASIN` intrinsic function results in a link-time error (undefined reference).
If the function argument is a constant, the compilation succeeds.
The following intrinsic functions can be compiled and executed:
`SIN`, `COS`, `TAN`, `ATAN`
GNU's Fortran compiler is OK.
The following are the test program, flang-new compilation results, and gfortran compilation results.
x001.f90:
```fortran
program main
real(4) ae
real(8) ad
ae = 0e0
ad = 0d0
write(6,*) "ASIN(ae) = ", ASIN(ae)
write(6,*) "ASIN(ad) = ", ASIN(ad)
end program main
```
```
$ flang-new -flang-experimental-exec x001.f90
/tmp/x001-072801.o: In function `_QQmain':
/home/users/ea01/ea0178/CT/fort/tp/reproducer/f90user/./x001.f90:6: undefined reference to `__fs_asin_1'
/home/users/ea01/ea0178/CT/fort/tp/reproducer/f90user/./x001.f90:7: undefined reference to `__fd_asin_1'
flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
$
```
```
$ gfortran x001.f90
$ ./a.out
ASIN(ae) = 0.00000000
ASIN(ad) = 0.0000000000000000
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VUtv2zgQ_jXShbBA0rYeBx3cBF4EW6Qomu01oMShzKxMGiSVpP9-h7IsJ46D3R5WEExqhpzvm6cbK3_VSU6nl94mdPMTnNfWEKuI6oXpFgZeSLLcEJZnNKMJL4GqhjKoiiZvCskV5HnDimaZAzRVKURRtjksmybh1dHkBcIs3Py4u8eFaBOcNl63RA2mDRHdgR_64FFFBOm1-XsR9B4I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