diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9c0afd60faa..523fbcbf3c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-04-27 Richard Guenther + + PR middle-end/40561 + * g++.dg/other/pr40561.C: New testcase. + 2010-04-27 Martin Jambor PR middle-end/43812 diff --git a/gcc/testsuite/g++.dg/other/pr40561.C b/gcc/testsuite/g++.dg/other/pr40561.C new file mode 100644 index 00000000000..c94dfa4bd62 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr40561.C @@ -0,0 +1,38 @@ +// { dg-do compile } + +#include + +class SyAccess; +class VamsBase +{ + public: + virtual ~VamsBase(void); +}; + +class VamsFnct : public VamsBase +{ + public: + ~VamsFnct(void); + std::set getNullDependencies(void) const + { return std::set(); + } +}; + +class VamsFnctSystem:public VamsFnct +{ public: + VamsFnctSystem( + const bool _bPassDependencies); +}; + +template< std::set (VamsFnct::*__GET_DEP__)(void) const > +class VamsSystemFunction:public VamsFnctSystem +{ public: + VamsSystemFunction() + :VamsFnctSystem( + __GET_DEP__ != &VamsFnct::getNullDependencies + ) + { + } +}; + +VamsSystemFunction<&VamsFnct::getNullDependencies> s;