<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 - LLVM ERROR: out of memory on a missing union variable"
href="https://bugs.llvm.org/show_bug.cgi?id=50649">50649</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLVM ERROR: out of memory on a missing union variable
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>k.even-mendoza@imperial.ac.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24935" name="attach_24935" title="trace of the crash in Clang-12">attachment 24935</a> <a href="attachment.cgi?id=24935&action=edit" title="trace of the crash in Clang-12">[details]</a></span>
trace of the crash in Clang-12
The following code crashed the compiler:
```
union U0 {
const volatile int f0;
};
static unsigned short g_54 = 0x8C83L;
static volatile unsigned short g_139 = 0x707CL;
static const volatile union U0 g_539 = {0x6A7978CCL};
int main (int argc, char* argv[]) {
unsigned short *a = &g_54;
unsigned short *l_639 = &g_54;
(*a) = ((*l_639) |= f(p_39.f0, p_39.f0));
return 0;
}
```
with Clang-13, Clang-12, Clang-11 and Clang-10, and with the following error:
LLVM ERROR: out of memory
Allocation failed
...
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: clang frontend command failed due to signal (use -v to see
invocation).
I attached the full trace as a file.
I ran it with -O0: clang -O0 test2.c (Ubuntu-18 64x, 32GB RAM and 4 CPUs)
It doesn't crash with GCC and ends in few seconds.</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>