diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-12 09:17:46 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-12 09:17:46 +0000 |
commit | 297aae790be68ca99ce95e36f8d508ac2ad407b6 (patch) | |
tree | e34914ce82311322e97d112d3cf23849d9313ebc | |
parent | b81ef88dcdef091eb4050604ffba9367268b16bb (diff) | |
download | gcc-297aae790be68ca99ce95e36f8d508ac2ad407b6.tar.gz |
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60054
* g++.dg/cpp1y/pr60054.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210323 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/pr60054.C | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 80b1b54e743..84ff764bbb1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/60054 + * g++.dg/cpp1y/pr60054.C: New. + +2014-05-12 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/51199 * g++.dg/template/pr51199.C: New. diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60054.C b/gcc/testsuite/g++.dg/cpp1y/pr60054.C new file mode 100644 index 00000000000..6b5179ac7dd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr60054.C @@ -0,0 +1,11 @@ +// PR c++/60054 +// { dg-do compile { target c++1y } } + +template<typename T> T fooA(T); +template<typename T> decltype(T{}) fooB(T); + +void bar() +{ + fooA((auto*)0); // { dg-error "invalid use" } + fooB((auto*)0); // { dg-error "invalid use" } +} |