aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-10-04 23:19:46 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-10-04 23:19:46 +0000
commit87a52ec1f65f29c71b48c2d9e6508c5d090bf819 (patch)
tree0af4f146cf84560aa6f426df487ca529d6aaaf1f /gcc
parent693445c9123e815d55daade0d5e32aee2583185b (diff)
downloadgcc-87a52ec1f65f29c71b48c2d9e6508c5d090bf819.zip
gcc-87a52ec1f65f29c71b48c2d9e6508c5d090bf819.tar.gz
gcc-87a52ec1f65f29c71b48c2d9e6508c5d090bf819.tar.bz2
re PR c++/53403 (Function template friend denied access to private types of granting template class.)
2012-10-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53403 * g++.dg/template/friend53.C From-SVN: r192108
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/friend53.C23
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f7003f9..734d046 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..6cbbb2b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend53.C
@@ -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>();
+}