aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gnat.com>2001-10-10 22:01:14 +0000
committerGeert Bosch <bosch@gcc.gnu.org>2001-10-11 00:01:14 +0200
commita8fee9482f156705563bc70af58254b3d8a1292d (patch)
tree856737a3422bfc2d674df332c0853fcf2b42fe73 /gcc
parent0a9771231409863b86f66b1e1c368a53b65980da (diff)
downloadgcc-a8fee9482f156705563bc70af58254b3d8a1292d.zip
gcc-a8fee9482f156705563bc70af58254b3d8a1292d.tar.gz
gcc-a8fee9482f156705563bc70af58254b3d8a1292d.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 194dde5..b3f500e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
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
VAR_DECL for constant if not Is_Public but -O0.
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 34a01cd..5845110 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;