OSDN Git Service

PR testsuite/25241
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / crash13.C
1 // { dg-do compile }
2
3 // Origin: Volker Reichelt <reichelt@gcc.gnu.org>
4
5 // PR c++/11076: ICE for invalid access declaration containing typename.
6
7 template<typename, typename T=void> struct A
8 {
9     typedef A<T,T> B;
10 };
11
12 template <typename T> struct C
13 {
14     typedef typename A<T>::B X;
15     X::Y;                       // { dg-error "not a base type" }
16 };
17
18 C<void> c;                      // { dg-message "instantiated" }