1// PR c++/19989 2// Don't instantiate a function template if it would generate an 3// array of size zero. 4 5// { dg-do compile } 6 7template<int T> struct cl { 8 const static int value = T; 9}; 10 11template<int I> void fn (char (*) [cl<I>::value] = 0 ); 12 13void foo (void) 14{ 15 fn<0> (); // { dg-error "no matching function" } 16} 17 18