<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Zero-size byval argument crashes AArch64 isel"
href="https://bugs.llvm.org/show_bug.cgi?id=33297">33297</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Zero-size byval argument crashes AArch64 isel
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>Backend: AArch64
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>code@klickverbot.at
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>This hits an assert in LLVM 4.0 (also seems to be present in trunk):
---
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnu"
define i32 @foo([0 x i32]* byval align 4 %bar) {
ret i32 0
}
---
```
llc: /build/src/llvm/lib/CodeGen/MachineFunction.cpp:824: int
llvm::MachineFrameInfo::CreateFixedObject(uint64_t, int64_t, bool, bool):
Assertion `Size != 0 && "Cannot allocate zero size fixed stack objects!"'
failed.
#0 0x0000000000ea4378 (llc+0xea4378)
Stack dump:
0. Program arguments: llc test.ll
1. Running pass 'Function Pass Manager' on module 'test.ll'.
2. Running pass 'AArch64 Instruction Selection' on function '@foo'
Aborted
```
While the code is not very useful, the backend probably shouldn't assert.</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>