Commit da81cc57 by Eric Botcazou Committed by Eric Botcazou

* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.

From-SVN: r275187
parent 81e753d9
2019-08-30 Eric Botcazou <ebotcazou@adacore.com> 2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gigi_checking_assert): New macro. * gcc-interface/gigi.h (gigi_checking_assert): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>: * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
Remove redundant test and adjust comments. Minor tweaks. Remove redundant test and adjust comments. Minor tweaks.
......
...@@ -2351,6 +2351,9 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute) ...@@ -2351,6 +2351,9 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
gnu_type = TREE_TYPE (DECL_CHAIN (TYPE_FIELDS (gnu_type))); 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 we're looking for the size of a field, return the field size. */
if (TREE_CODE (gnu_prefix) == COMPONENT_REF) if (TREE_CODE (gnu_prefix) == COMPONENT_REF)
gnu_result = DECL_SIZE (TREE_OPERAND (gnu_prefix, 1)); gnu_result = DECL_SIZE (TREE_OPERAND (gnu_prefix, 1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment