Message ID | 1658397.meEJfPj24F@arcturus.home |
---|---|
State | New |
Headers | show |
Series | [Ada] Add assertion for Size attribute et al. | expand |
Index: gcc-interface/trans.c =================================================================== --- gcc-interface/trans.c (revision 275174) +++ gcc-interface/trans.c (working copy) @@ -2351,6 +2351,9 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_res gnu_type = TREE_TYPE (DECL_CHAIN (TYPE_FIELDS (gnu_type))); } + /* The type must be frozen at this point. */ + gcc_assert (COMPLETE_TYPE_P (gnu_type)); + /* If we're looking for the size of a field, return the field size. */ if (TREE_CODE (gnu_prefix) == COMPONENT_REF) gnu_result = DECL_SIZE (TREE_OPERAND (gnu_prefix, 1));