https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96097
Bug ID: 96097
Summary: ICE in dependent_type_p, at cp/pt.c:26326
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bruck.michael at gmail dot com
Target Milestone: ---
https://gcc.godbolt.org/z/WVUAy5
Same error location as PR95931, but very different test case with valid code
(probably).
<source>: In function 'void test()':
<source>:17:22: internal compiler error: in dependent_type_p, at cp/pt.c:26343
17 | func<Y<X, 0>, Y>();
| ^
Fails with -std=c++17 at least since gcc5.1
---
template <
typename A,
template <typename T, typename T::typeX> typename TA>
auto func()
{
return TA<typename A::typeY, 0>{};
}
struct X { using typeX = int; };
template <typename T, int>
// template <typename T, typename T::typeX> // works
struct Y { using typeY = T; };
void test()
{
func<Y<X, 0>, Y>();
}
---