[LLVMbugs] [Bug 14538] New: Impossible TemplateArgument
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 7 08:20:20 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14538
Bug #: 14538
Summary: Impossible TemplateArgument
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: rafael.espindola at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Given
template <typename T, int I>
struct Value;
template <typename T>
struct Value<T, 0> {
};
template<typename TContainer, unsigned>
struct InternalMap {
};
template<typename T1>
struct Value<InternalMap<T1, 1>, 0 > {
typedef char Type;
};
template<typename T1>
typename Value<InternalMap<T1, 1>, 0 >::Type property();
void Test_Property() {
property<char>();
}
clang -cc1 crashes with
Impossible TemplateArgument
UNREACHABLE executed at
/home/espindola/llvm/llvm/tools/clang/lib/AST/TypeLoc.cpp:326!
0 clang 0x0000000001128702
1 clang 0x0000000001128b93
2 libpthread.so.0 0x00007f7150fe5fe0
3 libc.so.6 0x00007f7150442935 gsignal + 53
4 libc.so.6 0x00007f71504440e8 abort + 328
5 clang 0x00000000010fb009 llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int) + 457
6 clang 0x0000000001d30041
clang::TemplateSpecializationTypeLoc::initializeArgLocs(clang::ASTContext&,
unsigned int, clang::TemplateArgument const*, clang::TemplateArgumentLocInfo*,
clang::SourceLocation) + 417
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list