Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible TemplateArgument #14910

Closed
llvmbot opened this issue Dec 7, 2012 · 3 comments
Closed

Impossible TemplateArgument #14910

llvmbot opened this issue Dec 7, 2012 · 3 comments
Labels
bugzilla c++ duplicate

Comments

@llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Dec 7, 2012

Bugzilla Link 14538
Resolution DUPLICATE
Resolved on Jul 22, 2016 10:34
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @d0k,@DougGregor

Extended Description

Given

template <typename T, int I>
struct Value;
template
struct Value<T, 0> {
};
template<typename TContainer, unsigned>
struct InternalMap {
};
template
struct Value<InternalMap<T1, 1>, 0 > {
typedef char Type;
};
template
typename Value<InternalMap<T1, 1>, 0 >::Type property();
void Test_Property() {
property();
}

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

@llvmbot
Copy link
Collaborator Author

@llvmbot llvmbot commented Dec 20, 2012

This looks pretty similar to bug #​14458.

@llvmbot
Copy link
Collaborator Author

@llvmbot llvmbot commented Jan 22, 2016

I cannot reproduce this, even with builds as old as clang-r218999-t2014-10-03_11-52-21-b569 obtained via llvmlab. Can this be closed?

@llvmbot
Copy link
Collaborator Author

@llvmbot llvmbot commented Jul 22, 2016

I believe this has been fixed for a long time.

Can't reproduce it with clang 3.5.2, 3.6.2, 3.7.1, or 3.8.1.

Closing.

*** This bug has been marked as a duplicate of bug #14830 ***

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla c++ duplicate
Projects
None yet
Development

No branches or pull requests

1 participant