Frontend crash when instantiating an inner-class deduction guide inside a variadic outer template
Environment
Clang 19.1.0 (x86-64-unknown-linux-gnu, release build without assertions)
Command
$ clang++ -c test9.cpp
Actual behavior
The compiler crashes with a stack dump while instantiating the inner class template’s deduction guide (at any optimization level, -O0 through -O3).
Additional notes
The test case was produced by an automated compiler-testing tool (GapSmith).
Test case (test9.cpp)
template <typename... Args>
struct outer {
template <typename Type>
struct inner {
inner(Args...) { }
};
inner(Args...) -> inner<int>;
};
int main() {
outer();
}
@llvm/issue-subscribers-clang-frontend
Author: ICSE-27
Environment
Clang 19.1.0 (x86-64-unknown-linux-gnu, release build without assertions)
Command
clang++ -c test9.cpp
Actual behavior
The compiler crashes with a stack dump while instantiating the inner class template’s deduction guide (at any optimization level, -O0 through -O3).
Additional notes
The test case was produced by an automated compiler-testing tool (GapSmith).
Test case (test9.cpp)
template <typename... Args>
struct outer {
template <typename Type>
struct inner {
inner(Args...) { }
};
inner(Args...) -> inner<int>;
};
int main() {
outer();
}
@ICSE-27 You should
- Report bugs only if they appears with the most recent release. Older releases are not maintained.
- Provide a godbolt link with assertions build if possible.
- Check for duplicate before submitting.
- Tell which version the bug goes back to (which version introduced the bug).
- Remove useless things, e.g.
test6.cpp.
Please update your reports.
It seems that many of the cases you reported are identical to others. What's the cause?