aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-01-01 13:31:48 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-01-01 13:31:48 +0000
commit1d2314ed1c90db68ee4e0e4c603773f5bc258f0b (patch)
treedd30ad098f2b8404d6fd216bbc35c47cd8caa7bd
parent06f1716bd710974593f641e76e648fa54ad23c3a (diff)
downloadgcc-1d2314ed1c90db68ee4e0e4c603773f5bc258f0b.zip
gcc-1d2314ed1c90db68ee4e0e4c603773f5bc258f0b.tar.gz
gcc-1d2314ed1c90db68ee4e0e4c603773f5bc258f0b.tar.bz2
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
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C25
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7cc8411..9b6c8e5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
new file mode 100644
index 0000000..51e2387
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
@@ -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)
+ { }
+};