re PR c++/51723 ([C++0x] delegating constructor ICE)

2012-01-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51723
	* g++.dg/cpp0x/constexpr-delegating2.C: New.

From-SVN: r182768
This commit is contained in:
Paolo Carlini 2012-01-01 13:31:48 +00:00 committed by Paolo Carlini
parent 06f1716bd7
commit 1d2314ed1c
2 changed files with 30 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51723
* g++.dg/cpp0x/constexpr-delegating2.C: New.
2012-01-01 Jan Hubicka <jh@suse.cz>
PR rtl-optimization/51069

View file

@ -0,0 +1,25 @@
// PR c++/51723
// { dg-options -std=c++0x }
template <int... V>
struct A
{
static constexpr int a[sizeof...(V)] = { V... };
};
template <int... V> constexpr int A<V...>::a[];
struct B
{
const int* const b;
template <unsigned int N>
constexpr B(const int(&b)[N])
: b(b)
{ }
template <int... V>
constexpr B(A<V...>)
: B(A<V...>::a)
{ }
};