From: Richard Kenner Date: Wed, 10 Oct 2001 22:01:14 +0000 (+0000) Subject: decl.c: (validate_size): Do check size of object of integral type if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8fee9482f156705563bc70af58254b3d8a1292d;p=gcc.git decl.c: (validate_size): Do check size of object of integral type if... * decl.c: (validate_size): Do check size of object of integral type if it is a packed array type. From-SVN: r46162 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 194dde5c00a..b3f500e43a4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2001-10-10 Richard Kenner + + * decl.c: (validate_size): Do check size of object of integral type + if it is a packed array type. + 2001-10-10 Richard Kenner * decl.c: (gnat_to_gnu_entity, case object): Also materialize diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 34a01cd275f..5845110ad66 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -5516,7 +5516,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok) need not do it here (which would entail checking against the bounds). However, if this is an aliased object, it may not be smaller than the type of the object. */ - if (INTEGRAL_TYPE_P (gnu_type) + if (INTEGRAL_TYPE_P (gnu_type) && ! TYPE_PACKED_ARRAY_TYPE_P (gnu_type) && ! (kind == VAR_DECL && Is_Aliased (gnat_object))) return size;