aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/crash30.C
blob: 9b68535faa48067e43896095804c5398e9e9b903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
namespace N { template<int> struct A { operator int() const; }; }
namespace M { template<int> struct A {}; }
namespace P { typedef int I; }

template<typename> void foo()
{
  +typename N::A<0>();  // { dg-bogus "expected" }
}

template<typename> void bar()
{
  +typename M::A<0>;  // { dg-error "expected" }
}

template<typename T> void baz() {
  typename P::I i;  // { dg-bogus "expected" }
}