summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/access3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/inherit/access3.C')
-rw-r--r--gcc/testsuite/g++.dg/inherit/access3.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/inherit/access3.C b/gcc/testsuite/g++.dg/inherit/access3.C
new file mode 100644
index 000000000..1862bfc34
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/access3.C
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+class __new_alloc {
+public:
+ static void allocate() {}
+};
+
+template <class _Alloc>
+class __debug_alloc : public _Alloc {
+public:
+ static void allocate();
+};
+
+template <class _Alloc>
+void __debug_alloc<_Alloc>::allocate() {
+ _Alloc::allocate();
+}
+
+template class __debug_alloc<__new_alloc>;