<html>
<head>
<base href="http://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 --- - Crash when aliasing a template class that is a member of its template base class."
href="http://llvm.org/bugs/show_bug.cgi?id=16904">16904</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash when aliasing a template class that is a member of its template base class.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cassio.neri@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, 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=11042" name="attach_11042" title="run script for the code in the description.">attachment 11042</a> <a href="attachment.cgi?id=11042&action=edit" title="run script for the code in the description.">[details]</a></span>
run script for the code in the description.
The code below crashes clang 3.3 (coincidentaly, it also crashes gcc 4.8.1).
The associated run script is attached.
---------------------------------------------------------------------
template <typename T, typename U>
struct base {
template <typename V>
struct derived;
};
template <typename T, typename U>
template <typename V>
struct base<T, U>::derived : public base<T, V> {
};
// This (wrong?) alias declaration provoques the crash.
template <typename T, typename U, typename V>
using derived = base<T, U>::derived<V>;
// This one works:
// template <typename T, typename U, typename V>
// using derived = typename base<T, U>::template derived<V>;
template <typename T>
void f() {
derived<T, bool, char> m{};
(void) m;
}
int main() {
f<int>();
}
---------------------------------------------------------------------</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>