1 // Copyright (C) 2005 Free Software Foundation, Inc. 2 // Contributed by Nathan Sidwell 12 Oct 2005 <nathan@codesourcery.com> 3 4 // PR 21592:ICE 5 // Origin: Volker Reichelt <reichelt@gcc.gnu.org> 6 7 template<typename T> void unique(T,T); 8 9 struct A 10 { 11 int begin(); 12 }; 13 foo()14template<int> void foo() 15 { 16 unique(A().begin); // { dg-error "invalid use of non-static member function" } 17 } 18