summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash38.C
blob: 4fc658eb157009dd3e1fb1a068d93364e2842bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do assemble  }
// Origin: Mark Mitchell <mark@codesourcery.com>

template <class T>
struct S {
  typedef typename T::Y<T>::Z X; // { dg-error "non-template" "non-template" } No Y in A
// { dg-message "note" "note" { target *-*-* } 6 }
// { dg-error "does not declare" "not declare" { target *-*-* } 6 }
  X x; // { dg-error "does not name a type" } No Y in A
};

struct A {
  struct Y {
    typedef A Z;
  };
};

template struct S<A>;