This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add testcase for PR40561
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Apr 2010 13:26:11 +0200 (CEST)
- Subject: [PATCH] Add testcase for PR40561
Committed.
Richard.
2010-04-27 Richard Guenther <rguenther@suse.de>
PR middle-end/40561
* g++.dg/other/pr40561.C: New testcase.
Index: gcc/testsuite/g++.dg/other/pr40561.C
===================================================================
--- gcc/testsuite/g++.dg/other/pr40561.C (revision 0)
+++ gcc/testsuite/g++.dg/other/pr40561.C (revision 0)
@@ -0,0 +1,38 @@
+// { dg-do compile }
+
+#include <set>
+
+class SyAccess;
+class VamsBase
+{
+ public:
+ virtual ~VamsBase(void);
+};
+
+class VamsFnct : public VamsBase
+{
+ public:
+ ~VamsFnct(void);
+ std::set<SyAccess*> getNullDependencies(void) const
+ { return std::set<SyAccess*>();
+ }
+};
+
+class VamsFnctSystem:public VamsFnct
+{ public:
+ VamsFnctSystem(
+ const bool _bPassDependencies);
+};
+
+template< std::set<SyAccess*> (VamsFnct::*__GET_DEP__)(void) const >
+class VamsSystemFunction:public VamsFnctSystem
+{ public:
+ VamsSystemFunction()
+ :VamsFnctSystem(
+ __GET_DEP__ != &VamsFnct::getNullDependencies
+ )
+ {
+ }
+};
+
+VamsSystemFunction<&VamsFnct::getNullDependencies> s;