whose type is an array with unspecified bounds.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58149
138bc75d-0d04-0410-961f-
82ee72b054a4
2002-10-14 Mark Mitchell <mark@codesourcery.com>
+ * decl.c (layout_var_decl): Call layout_decl even for variables
+ whose type is an array with unspecified bounds.
+
PR c++/7176
* lex.c (do_identifier): Add another option for the parsing
parameter.
`extern X x' for some incomplete type `X'.) */
if (!DECL_EXTERNAL (decl))
complete_type (type);
- if (!DECL_SIZE (decl) && COMPLETE_TYPE_P (type))
+ if (!DECL_SIZE (decl)
+ && (COMPLETE_TYPE_P (type)
+ || (TREE_CODE (type) == ARRAY_TYPE
+ && !TYPE_DOMAIN (type)
+ && COMPLETE_TYPE_P (TREE_TYPE (type)))))
layout_decl (decl, 0);
if (!DECL_EXTERNAL (decl) && DECL_SIZE (decl) == NULL_TREE)