aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/trans.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-30 14:26:20 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-08-30 14:26:20 +0000
commitda81cc570f27e78f71fed25d3c21a1d7d7f3ed66 (patch)
treecf18e5e319ce548f35ee202bce982abb79ec9603 /gcc/ada/gcc-interface/trans.c
parent81e753d9c8a5930b5465676304df5d0d0c90294e (diff)
downloadgcc-da81cc570f27e78f71fed25d3c21a1d7d7f3ed66.zip
gcc-da81cc570f27e78f71fed25d3c21a1d7d7f3ed66.tar.gz
gcc-da81cc570f27e78f71fed25d3c21a1d7d7f3ed66.tar.bz2
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Add assertion.
From-SVN: r275187
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r--gcc/ada/gcc-interface/trans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index f21b9a8..bd861f3 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -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)));
}
+ /* 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));