diff options
Diffstat (limited to 'gcc/c/c-decl.cc')
| -rw-r--r-- | gcc/c/c-decl.cc | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index 2b31a43..1e1da2d 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -6536,6 +6536,10 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const,        return error_mark_node;      } +  if ((TREE_STATIC (decl) || C_DECL_DECLARED_CONSTEXPR (decl)) +      && C_TYPE_VARIABLE_SIZE (type)) +    error_at (loc, "storage size isn%'t constant"); +    if (TREE_STATIC (decl)        && !verify_type_context (loc, TCTX_STATIC_STORAGE, type))      return error_mark_node;  | 
