<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 - __builtin_assume: Assertion failed: (getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"), function setIncomingValue, file llvm/include/llvm/IR/Instructions.h, line 2576."
href="https://bugs.llvm.org/show_bug.cgi?id=46557">46557</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__builtin_assume: Assertion failed: (getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"), function setIncomingValue, file llvm/include/llvm/IR/Instructions.h, line 2576.
</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>All
</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>dimitry@andric.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>As reported in <a href="https://bugs.freebsd.org/247665">https://bugs.freebsd.org/247665</a>, clang 10.0 (and the most recent
clang 11) asserts while compiling the emulators/rpcs3 port. This happens during
parsing of an expression using __builtin_assume:
% cat System-min.cpp
// clang -cc1 -triple x86_64-- -S System-min.cpp
enum {} a;
class b {
public:
b() { a ? void() : __builtin_assume(0); }
} c;
% clang -cc1 -triple x86_64-- -S System-min.cpp
Assertion failed: (getType() == V->getType() && "All operands to PHI node must
be the same type as the PHI node!"), function setIncomingValue, file
/home/dim/src/llvm/llvm-project/llvm/include/llvm/IR/Instructions.h, line 2576.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -cc1 -triple x86_64-- -S System-min.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. System-min.cpp:5:3: Generating code for declaration 'b::b'
4. System-min.cpp:5:7: LLVM IR generation of compound statement ('{}')
#0 0x000000000304f378 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(clang+0x304f378)
#1 0x000000000304d0a8 llvm::sys::RunSignalHandlers() (clang+0x304d0a8)
#2 0x000000000304fadd SignalHandler(int) (clang+0x304fadd)
#3 0x0000000805750a30 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3</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>