<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - Clang crashes with the regparam function attribute when targeting AArch64" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24214&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5I_6m11yqUN8n0MK-DDcDadHecx1LD3waY801IlaNYM&s=wzZdsbnA5xggblt4yhnbBYNcD5s3BF0rG30Aeavp4cA&e=">24214</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang crashes with the regparam function attribute when targeting AArch64
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andrew@fubar.geek.nz
</td>
</tr>
<tr>
<th>CC</th>
<td>dimitry@andric.com, emaste@freebsd.org, llvmbugs@cs.uiuc.edu, rdivacky@freebsd.org, renato.golin@linaro.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14626" name="attach_14626" title="Example showing the assert">attachment 14626</a> <a href="attachment.cgi?id=14626&action=edit" title="Example showing the assert">[details]</a></span>
Example showing the assert
The AArch64TargetInfo class sets RegParmMax to 8, however in
include/clang/Basic/TargetInfo.h there is an assert that RegParmMax < 7.
The attached file shows the issue when built with:
clang -cc1 -triple aarch64-unknown-freebsd11.0 regparam_test.c
Building this with clang 3.6 from FreeBSD and clang 3.8 I get the following:
Assertion failed: (RegParmMax < 7 && "RegParmMax value is larger than AST can
handle"), function getRegParmMax, file
/home/andrew/freebsd/repo/llvm/tools/clang/include/clang/Basic/TargetInfo.h,
line 824.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>