aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash28.C
blob: 81ed85a28ef5c2f2b0b528419d7a454149727482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do assemble  }
// { dg-options "" }

template <class ARRY>
inline unsigned int asize(ARRY &a) // { dg-message "note" }
{
  return sizeof(a) / sizeof(a[0]);
}

void f(unsigned int n) {
  int x[n];

  asize(x); // { dg-error "" } no matching function
  // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } 13 }
}