<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 segfaults while doing decltype(auto) with a template" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23995&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=5JwyeXiYKjBAnbKdLTDTqzfcDq-xQrzE9-uXxYYbVWk&s=tY2diG41d16jagXxQIBkehSjBc9F5vdqiaaeTBHRAYU&e=">23995</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang segfaults while doing decltype(auto) with a template
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.5
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bloch_j@epita.fr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14541" name="attach_14541" title="The compilation logs">attachment 14541</a> <a href="attachment.cgi?id=14541&action=edit" title="The compilation logs">[details]</a></span>
The compilation logs
Steps to Reproduce:
$ cat sigsegv.cpp
template <int Arg>
int fun()
{
return 0;
}
int main()
{
int tata = 0;
decltype(auto) a = fun<tata>;
}
$ clang++ -o sigsegv -std=c++11 sigsegv.cpp
# The dump is in attachment.
Actual Results:
clang segfaults
Expected Results:
Fail compilation with an error. (cf gcc behavior in attachment)
Additional information:
Without the decltype or the template, clang does not crash.
The same problem appears compiling with c++ standard >= 0x.</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>