re PR c++/63904 (ICE when accessing array member of constexpr struct)
authorKai Tietz <ktietz@redhat.com>
Thu, 27 Nov 2014 12:56:58 +0000 (13:56 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Thu, 27 Nov 2014 12:56:58 +0000 (13:56 +0100)
PR c++/63904
* g++.dg/cpp0x/pr63904.C: New.

From-SVN: r218122

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr63904.C [new file with mode: 0644]

index 1bdaf1b9ef8b6315154844b73b58be9ea3c158f4..86af18c6c851960edfe92a5a81e4db377e47569b 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-27  Kai Tietz  <ktietz@redhat.com>
+
+       PR c++/63904
+       * g++.dg/cpp0x/pr63904.C: New.
+
 2014-11-27  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/64067
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr63904.C b/gcc/testsuite/g++.dg/cpp0x/pr63904.C
new file mode 100644 (file)
index 0000000..2db610b
--- /dev/null
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+
+template<int N>
+struct foo {
+    constexpr foo() : a() {}
+    int a[N];
+};
+
+int main() {
+  foo< (foo<1>{}).a[0] > f;
+  return 0;
+}
+