decl.c: (validate_size): Do check size of object of integral type if...
authorRichard Kenner <kenner@gnat.com>
Wed, 10 Oct 2001 22:01:14 +0000 (22:01 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Wed, 10 Oct 2001 22:01:14 +0000 (00:01 +0200)
* decl.c: (validate_size): Do check size of object of integral type
if it is a packed array type.

From-SVN: r46162

gcc/ada/ChangeLog
gcc/ada/decl.c

index 194dde5c00a4aa8fad21e52f778de633df8c6926..b3f500e43a4931e18cc996f2d32a946fe9d27e79 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-10  Richard Kenner <kenner@gnat.com>
+
+       * decl.c: (validate_size): Do check size of object of integral type 
+       if it is a packed array type.
+
 2001-10-10  Richard Kenner <kenner@gnat.com>
 
        * decl.c: (gnat_to_gnu_entity, case object): Also materialize 
index 34a01cd275ffbece3216ea0d56be0f17dffc3a97..5845110ad66a7cf0843b36b70c5b52c3ecede363 100644 (file)
@@ -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;