[LLVMbugs] [Bug 16904] New: Crash when aliasing a template class that is a member of its template base class.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 15 12:35:54 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16904
Bug ID: 16904
Summary: Crash when aliasing a template class that is a member
of its template base class.
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: cassio.neri at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11042
--> http://llvm.org/bugs/attachment.cgi?id=11042&action=edit
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>();
}
---------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130815/388e986b/attachment.html>
More information about the llvm-bugs
mailing list