2012-10-04 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Oct 2012 23:19:46 +0000 (23:19 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Oct 2012 23:19:46 +0000 (23:19 +0000)
PR c++/53403
* g++.dg/template/friend53.C

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

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

index f7003f9..734d046 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>();
+}