OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / func2.C
1 // { dg-do compile }
2
3 typedef void (*fptr)();
4 fptr zeroptr = 0;
5 template<typename T, fptr F> struct foo { };
6 template<typename T> struct foo<T,zeroptr> { };
7 // { dg-error "not a valid template argument" "not valid" { target *-*-* } 6 } 
8 // { dg-error "must be the address" "must be the address " { target *-*-* } 6 }
9
10 // The rest is needed to trigger the ICE in 4.0 to 4.3:
11 void f() { }
12 foo<int,&f> m_foo;