From 6a5545d9657d71f2b637e32270fa52270442bbf8 Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 14 Feb 2018 17:59:29 +0000 Subject: /cp 2018-02-14 Paolo Carlini PR c++/84350 * pt.c (do_auto_deduction): Don't check the TREE_TYPE of a null init, early return. /testsuite 2018-02-14 Paolo Carlini PR c++/84350 * g++.dg/cpp0x/auto49.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257666 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/g++.dg/cpp0x/auto49.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/auto49.C (limited to 'gcc/testsuite/g++.dg/cpp0x/auto49.C') diff --git a/gcc/testsuite/g++.dg/cpp0x/auto49.C b/gcc/testsuite/g++.dg/cpp0x/auto49.C new file mode 100644 index 00000000000..25b09dfdec1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/auto49.C @@ -0,0 +1,12 @@ +// PR c++/84350 +// { dg-do compile { target c++11 } } + +template void foo(T... t) +{ + new auto(t...); // { dg-error "invalid use" } +} + +void bar() +{ + foo(); +} -- cgit v1.2.1