PR c++/51369
* init.c (build_value_init): Allow array types even when
processing_template_decl.
* g++.dg/cpp0x/constexpr-51369.C: New test.
From-SVN: r182086
+2011-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51369
+ * init.c (build_value_init): Allow array types even when
+ processing_template_decl.
+
2011-12-07 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/51420
constructor. */
/* The AGGR_INIT_EXPR tweaking below breaks in templates. */
- gcc_assert (!processing_template_decl || SCALAR_TYPE_P (type));
+ gcc_assert (!processing_template_decl
+ || (SCALAR_TYPE_P (type) || TREE_CODE (type) == ARRAY_TYPE));
if (CLASS_TYPE_P (type))
{
+2011-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51369
+ * g++.dg/cpp0x/constexpr-51369.C: New test.
+
2011-12-07 Andrew Pinski <apinski@cavium.com>
PR middle-end/45416
--- /dev/null
+// PR c++/51369
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+constexpr int x[2][2] = {};
+
+template<int>
+void
+foo ()
+{
+ x[0][0];
+}