<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 - R-value Reference list init causes segfault in CodeGen::tryEmitPrivate"
href="https://bugs.llvm.org/show_bug.cgi?id=47636">47636</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>R-value Reference list init causes segfault in CodeGen::tryEmitPrivate
</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>Windows NT
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>erich.keane@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>The reproducer is just:
int(&&intu_rvref)[]{1,2,3,4};
The handling of tryEmitPrivate assumes that if there are elements in the
initializer, that it is a ConstantArrayType (CAT is not nullptr here:
<a href="https://github.com/llvm/llvm-project/blob/master/clang/lib/CodeGen/CGExprConstant.cpp#L2134">https://github.com/llvm/llvm-project/blob/master/clang/lib/CodeGen/CGExprConstant.cpp#L2134</a>).
The result is a seg-fault.
Presumably, I could change the getAsConstantArrayType to just getAsArrayType
(and update the test on 2147 to check for ConstantArrayType instead), but I was
unsure if the problem is that the AST itself is being formed incorrectly.
Does anyone have a suggestion?</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>