re PR c++/66690 (error: use of ‘X’ before deduction of ‘auto’)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 6 Oct 2017 19:04:25 +0000 (19:04 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 6 Oct 2017 19:04:25 +0000 (19:04 +0000)
2017-10-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/66690
* g++.dg/cpp1y/pr66690.C: New.

From-SVN: r253502

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

index 97825c3319c4db18be2c718f0f3c6f332434f075..e48f743168c36dae8686fdeb3bdeb5cd25e1d97f 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-06  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/66690
+       * g++.dg/cpp1y/pr66690.C: New.
+
 2017-10-06  Nathan Sidwell  <nathan@acm.org>
 
        PR c++/82424
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr66690.C b/gcc/testsuite/g++.dg/cpp1y/pr66690.C
new file mode 100644 (file)
index 0000000..3e32aa3
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/66690
+// { dg-do compile { target c++14 } }
+
+template<class T> auto foo(T t) {return 3;}
+class B {B();};  // { dg-message "declared private" }
+template<class T> class D:public B
+{
+    D()  // { dg-message "declared private" }
+    {  // { dg-error "is private" }
+        T x00;
+        foo(x00);
+    }
+};
+D<int> d;  // { dg-error "is private" }