re PR c++/53403 (Function template friend denied access to private types of granting...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 4 Oct 2012 23:19:46 +0000 (23:19 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 4 Oct 2012 23:19:46 +0000 (23:19 +0000)
2012-10-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/53403
* g++.dg/template/friend53.C

From-SVN: r192108

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

index f7003f989cbe2a482de824f3798fde9a8651afee..734d046012477bec5c3fd736b1cbda17e93b6c12 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/53403
+       * g++.dg/template/friend53.C
+
 2012-10-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        * lib/gcc-dg.exp (cleanup-ada-spec): New procedure.
diff --git a/gcc/testsuite/g++.dg/template/friend53.C b/gcc/testsuite/g++.dg/template/friend53.C
new file mode 100644 (file)
index 0000000..6cbbb2b
--- /dev/null
@@ -0,0 +1,23 @@
+// PR c++/53403
+
+template <typename T>
+class Foo
+{
+  typedef void type;
+  template <typename U> friend void f();
+public:
+  Foo() {}
+};
+
+template class Foo<void>;
+
+template <typename T>
+void f()
+{
+  typedef Foo<void>::type type;
+}
+
+int main()
+{
+  f<void>();
+}