PR c++/66921
* decl.c (cp_complete_array_type): Allow an initializer that
already has array type.
From-SVN: r232170
+2015-12-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/66921
+ * decl.c (cp_complete_array_type): Allow an initializer that
+ already has array type.
+
2015-12-17 Jason Merrill <jason@redhat.com>
PR c++/67576
/* Don't get confused by a CONSTRUCTOR for some other type. */
if (initial_value && TREE_CODE (initial_value) == CONSTRUCTOR
- && !BRACE_ENCLOSED_INITIALIZER_P (initial_value))
+ && !BRACE_ENCLOSED_INITIALIZER_P (initial_value)
+ && TREE_CODE (TREE_TYPE (initial_value)) != ARRAY_TYPE)
return 1;
if (initial_value)
--- /dev/null
+// PR c++/66921
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct Holder {
+ constexpr static const int array[] = { 1, 2, 3 };
+ enum {F = array[0]};
+};
+class HI: public Holder<int> {};