-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Clang frontend command failed with exit code 139 #123591
Comments
@llvm/issue-subscribers-clang-frontend Author: None (dvora124-wq)
Hi,
I've been experimenting with ways to model an AST in modern C++. During one of these experiments, my compiler crashed on me. Per request of the compiler itself, I've attached the output and the associated culprit files below. The issue seems to arise from a leftover
I accidentally left it in place when I was restructuring the program. Once I remove the declaration, the program still doesn't compile (that's correct), but the compiler doesn't crash anymore.
|
Confirmed on 21.0 (trunk): https://godbolt.org/z/7M3aPs4bq template < int >
using enable_if_t = int;
template < typename... _Types >
struct variant {
template < enable_if_t< sizeof...(_Types) > >
variant();
};
template <int>
using AstNode = variant<>;
AstNode tree; Clang 21.0 crash:
|
@llvm/issue-subscribers-c-17 Author: None (dvora124-wq)
Hi,
I've been experimenting with ways to model an AST in modern C++. During one of these experiments, my compiler crashed on me. Per request of the compiler itself, I've attached the output and the associated culprit files below. The issue seems to arise from a leftover
I accidentally left it in place when I was restructuring the program. Once I remove the declaration, the program still doesn't compile (that's correct), but the compiler doesn't crash anymore.
|
Clang 18 is rejecting, Clang 19 is rejecting for another reason: https://godbolt.org/z/feE1advM6 |
Combination of CTAD and aliases reminds me of #130604 |
CC @hokein |
Here is a similar and valid example that has caused a crash since version 19: template < typename... _Types >
struct variant {
template <int N = sizeof...(_Types)>
variant(_Types...);
};
template <class T>
using AstNode = variant<T>;
AstNode tree(42); https://godbolt.org/z/4rnG8fPah we don't seem to handle non-pack substitutions into parameter packs very well |
Hi,
I've been experimenting with ways to model an AST in modern C++. During one of these experiments, my compiler crashed on me. Per request of the compiler itself, I've attached the output and the associated culprit files below.
The issue seems to arise from a leftover
template <typename T>
declaration:I accidentally left it in place when I was restructuring the program. Once I remove the declaration, the program still doesn't compile (that's correct), but the compiler doesn't crash anymore.
main-8471ef.tar.gz
The text was updated successfully, but these errors were encountered: