gcc/testsuite/g++.old-deja/g++.pt/crash28.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "" } |
| 3 | |
| 4 | template <class ARRY> |
| 5 | inline unsigned int asize(ARRY &a) // { dg-message "note" } |
| 6 | { |
| 7 | return sizeof(a) / sizeof(a[0]); |
| 8 | } |
| 9 | |
| 10 | void f(unsigned int n) { |
| 11 | int x[n]; |
| 12 | |
| 13 | asize(x); // { dg-error "" } no matching function |
| 14 | // { dg-message "(candidate|not a valid template argument)" "candidate note" { target *-*-* } .-1 } |
| 15 | } |