<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJytU8lu2zAQ_RrqMohB05YVH3TIgha5926MqJHEhCIFLnbcr-9IttuiQItuAkFx9nmzNL4910--JUgDJgg0Bd9mTRG8gxSyewOh7n0AFlrCmODEenSkAB9923ibYMAIfBZlofZi8yDks5APYicvR0_ThXP0poWO_bEaiOrxwgX-DocmG5uMO4w06ul8MM4aRxdVsblqiur5B9dXcrlfEkSiMYI1bzMcCmxfRXjNnLXzQCEwjgFdy6576JhYMBuXgnHR6BW8dLMdaB8CaTbKY8NAfQcY-jySS4w0EPTmSA6anGbtMwcJSzw4Bc-O03niwE9g5nz6DrNNS4FOZO1_Lk45x7ldv1unX4SeH0I9AP5BDvg3OXzianlnzzCamON1-FCnjJaZy0S5a8NGihF7AsM8iOYzwYQBR0p061903AI25765mNAloPcpsJnxbgVFW2_a_WaPBeY0-FDTER1q_17kYOshpSnOXVEf-PQmDblZaT8yYe3x9rvjrXjliWDSxJgp8qNU--2-GOpKr3dabXCHW4Wtwq3Eci1b1VVa78p7XVhsyMZalI9CKUcnWFzwW5TPxb9nYGollZJruVZSbrdy1VZK074kXenmftOtxVbSiMauZj8rH_oi1IvLJveRhdbEFL8JkevWO6IlYc4wmWSZ2MmfjcBOgkZu4tyfjjcg3ZFrv44-nBgR79ivdoqxfKdx4y-LFIsFbr1g_QKQOHlx>52949</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`__builtin_memcpy_inline` causes a front-end segfault with incorrect number of arguments / incorrect argument types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
evanacox
</td>
</tr>
</table>
<pre>
Code that reproduces on trunk (or at least whatever Godbolt has as trunk):
```cpp
void f() {
__builtin_memcpy_inline();
}
```
It seems like there's just no error handling for that intrinsic. If the correct number of arguments are given but they're the wrong type, it segfaults as well:
```cpp
void f() {
__builtin_memcpy_inline(5, 5, 5);
}
```
```cpp
void f(void* a) {
__builtin_memcpy_inline(a, 5, 5);
}
```
The only misuse that actually has an error message is a size parameter that isn't a constant expression.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU9tunDAQ_RrzMsoKDJsNDzzkolR57_tqMAM4MTbyZTfbr-_A7rZVpUZpVWSBPZ4558yF1nWn5tF1BHHECJ5m77qkKICzEH2ybyDknfPAl4YwRDiyHx3IwxfXtc5EGDEAr9VZyFqU9yJ_Evm9uM3PS83z2XJwuoOe8dgNxO7hbAV-9vs2aRO13U80qfm019ZoS2dXUV48xe7pN-jLcX2_RAhEUwCj35Z0yHP8LsBrYtXWAXnPeYxoO4YeoOfDmrO20WsbtNrAS7_EgXLek-KgNLWcqOsB_ZAmspEz9QSDPpCFNsXF-8QkfuWDo3cMHE8zEz-CXvQMPSYT1wIdyZj_XJztwnN9fbZOH1AvGyHvAf9CA_6Lhq9cLWfNCSYdUrgMH6qY0LBxnSh7adhEIeBAoNkGQX8jmNHjRJGu_QuWW8Dh3DcbItoI9D57DtPObiDrmrKryxqzqKOhhpX8KZnbHBSynIWp517GG7LdjybCUceRp-Wj6RDy-RePq30diZAlb5oxxjksUyCfeQ2MmNqNchMfjDlcPzf8F74yAh91CIkCb7ayrupsbO52HZZU1LKsOixU2ee9Kqq86LeEWCnMDLZkQiO2D0JKS0dYIXgvtk-ZbmQuZV7khczzqso33U4qqrekdqq9K_tCVDlNqM1m0bFxfsh8s0pq0xD40ugQw89L5CoPlmilY3xMcXS-oQNaVO49W7mbVft3PlpkVg">