re PR c++/51416 ([c++0x] [4.6/4.7 Regression] ICE with invalid use of auto)

PR c++/51416
	* init.c (build_value_init_noctor): Check for incomplete type.

From-SVN: r182430
This commit is contained in:
Jason Merrill 2011-12-16 22:28:39 -05:00 committed by Jason Merrill
parent cc16324749
commit 23c74efa5f
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51416
* init.c (build_value_init_noctor): Check for incomplete type.
2011-12-16 Richard Henderson <rth@redhat.com>
PR bootstrap/51072

View File

@ -1,3 +1,8 @@
2011-12-16 Jason Merrill <jason@redhat.com>
PR c++/51416
* g++.dg/cpp0x/auto31.C: New.
2011-12-16 Ian Lance Taylor <iant@google.com>
PR middle-end/51592

View File

@ -0,0 +1,12 @@
// PR c++/51416
// { dg-do compile { target c++11 } }
template<typename T, typename... U> void foo(T, U... u)
{
auto foo(u...); // { dg-error "auto" }
}
void bar()
{
foo(0);
}

View File

@ -5,7 +5,7 @@ T&& create();
template<class T, class... Args>
void test() {
T t(create<Args>()...); // { dg-error "unknown bound" }
T t(create<Args>()...); // { dg-error "incomplete" }
(void) t;
}