===================================================================
@@ -7380,7 +7380,8 @@ ensure_literal_type_for_constexpr_object (tree dec
if (VAR_P (decl) && DECL_DECLARED_CONSTEXPR_P (decl)
&& !processing_template_decl)
{
- if (CLASS_TYPE_P (type) && !COMPLETE_TYPE_P (complete_type (type)))
+ tree stype = strip_array_types (type);
+ if (CLASS_TYPE_P (stype) && !COMPLETE_TYPE_P (complete_type (stype)))
/* Don't complain here, we'll complain about incompleteness
when we try to initialize the variable. */;
else if (!literal_type_p (type))
===================================================================
@@ -0,0 +1,8 @@
+// PR c++/60225
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ constexpr A() {}
+ static constexpr A a[2] = {}; // { dg-error "incomplete" }
+};