From: Paolo Carlini Date: Fri, 6 Oct 2017 19:04:25 +0000 (+0000) Subject: re PR c++/66690 (error: use of ‘X’ before deduction of ‘auto’) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58ebb59bef47e4171078422aaa46fb5bce395dfb;p=gcc.git re PR c++/66690 (error: use of ‘X’ before deduction of ‘auto’) 2017-10-06 Paolo Carlini PR c++/66690 * g++.dg/cpp1y/pr66690.C: New. From-SVN: r253502 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 97825c3319c..e48f743168c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-06 Paolo Carlini + + PR c++/66690 + * g++.dg/cpp1y/pr66690.C: New. + 2017-10-06 Nathan Sidwell 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 index 00000000000..3e32aa36fa7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr66690.C @@ -0,0 +1,14 @@ +// PR c++/66690 +// { dg-do compile { target c++14 } } + +template auto foo(T t) {return 3;} +class B {B();}; // { dg-message "declared private" } +template class D:public B +{ + D() // { dg-message "declared private" } + { // { dg-error "is private" } + T x00; + foo(x00); + } +}; +D d; // { dg-error "is private" }