1// { dg-do link  }
2// { dg-options "-Wno-deprecated" }
3
4struct B {
5  typedef int I;
6};
7
8template <class T>
9struct D1 : public B {
10};
11
12template <class T>
13struct D2 : public D1<T> {
14  I i;  // { dg-error "" } not a type
15};
16
17template <>
18struct D1<int> {
19  typedef double I;
20};
21
22template <class T>
23void f(T);
24template <>
25void f(double) {}
26
27int main()
28{
29  D2<int> d2i;
30  f(d2i.i); // { dg-error "" } no member i
31}
32