summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
new file mode 100644
index 000000000..c17090cc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
@@ -0,0 +1,5 @@
+// { dg-options -std=c++0x }
+
+template <const int I[2]> struct A { int ir[I[0]]; };
+extern constexpr int ar[2] = { 1, 2 };
+A<ar> a;