]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/semantics.c
semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array element type.
[thirdparty/gcc.git] / gcc / cp / semantics.c
index 8eb533614e09b3f74173d0642724985093f101a2..4869cfc47e9ed1be3f7d58c7ac28a820baefd8af 100644 (file)
@@ -5152,7 +5152,8 @@ check_trait_type (tree type)
   if (COMPLETE_TYPE_P (type))
     return true;
 
-  if (TREE_CODE (type) == ARRAY_TYPE && !TYPE_DOMAIN (type))
+  if (TREE_CODE (type) == ARRAY_TYPE && !TYPE_DOMAIN (type)
+      && COMPLETE_TYPE_P (TREE_TYPE (type)))
     return true;
 
   if (VOID_TYPE_P (type))