PR c++/10849
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 May 2003 10:34:51 +0000 (10:34 +0000)
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 May 2003 10:34:51 +0000 (10:34 +0000)
* g++.dg/template/access10.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67163 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/access10.C [new file with mode: 0644]

index aea6a25..37b37b4 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/10849
+       * g++.dg/template/access10.C: New test.
+
 2003-05-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
             Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
 
diff --git a/gcc/testsuite/g++.dg/template/access10.C b/gcc/testsuite/g++.dg/template/access10.C
new file mode 100644 (file)
index 0000000..8b4883c
--- /dev/null
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+// Origin: Giovanni Bajo <giovannibajo@libero.it>
+
+// PR c++/10849: Incorrect access checking on template specialization.
+
+class X {
+  private:
+    template <typename T> struct Y;
+};
+
+template <> struct X::Y<int> {};
+
+template <typename T> struct X::Y {};
+
+template struct X::Y<int>;