<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82576>82576</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] how to link derf?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ye-luo
</td>
</tr>
</table>
<pre>
```
program ab
implicit none
real*8 a,b,derf
b=2.d0
a=derf(dsqrt(b))
end program
```
```
$ flang-new main.f90
/usr/bin/ld: /tmp/main-3d7c8c.o: in function `_QQmain':
FIRModule:(.text+0x28): undefined reference to `derf_'
flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
```
It seems to be a GNU extension but GNU/INTEL/NVFortran all work.
erf is available in libm so probably just need a wrapper?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcU12P6yYQ_TX4ZRSLjO3YfvBD7k2pVmpXulXb1ysw44RdDCngJPvvK5xkr7QSks3MmcOZLxmjOTqigTXfWHMo5JJOPgwftLGLL5TXHwPb8cfhB8b35-CPQc4g1f0OYOazNaNJ4LyjpzGQtAz3HUiG3xXD75rC9HQqVh2w1A9GkKw6rG7sdPwvJIadYtjnswLIaXg8ezd8kfT1ijVMVrrjxtEVZmlcOfUcnk6xxMBQKOMYCqtZtQeGIs1nhiKDN5Vux24sffYYB9PixmS8A7bjP3_8yBCGLav2d0Lx8tefXi-WsgW7MtEtMfzGb9jlBKo9LE7TZBxpCDRRIDcSJJ_pctI_M9nK9Kk5B1EIPuQfa9w7BRj9PEunYZLGkoarSSegm0kwek2wBYbdEgk2l0wdicC4ix9lFv5Zxy91ekkZOMccoQgk_P76D9AtkYs5XbWkbGEoXl7__u0PhuL1X-FDCtKBtBauPryXD-J7m8IEJoK8SGOlslkCWKNmiD63T0llP-BtiQkckQYJ1yDPZwqsEoUeKt1XvSxo2La8a9quqvriNIyodUuyx7buOGritZKScDdWslb91BVmQI41R0Te8Kbqy3onG8mndsunccu7itWcZmlsae1lLn04FibGhYYOm3ZXWKnIxnX6EdcGMMS8CGHI-I1ajpHV3JqY4i-GZJJdV0asEc0BTv6ay5ibBesoV6JYgh1OKZ3jOhmCoTiadFpUOfo5j569PD-bc_BvNCaGYhUXGYpV3_8BAAD__9iOF_Q">