summaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 22:01:14 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-10 22:01:14 +0000
commit9d1b6043f2683567085474587ae8d2954efa977d (patch)
tree856737a3422bfc2d674df332c0853fcf2b42fe73 /gcc/ada/decl.c
parent82f00d589ea23e7f73355ad4f4348dfbfad6f54c (diff)
downloadgcc-9d1b6043f2683567085474587ae8d2954efa977d.tar.gz
* decl.c: (validate_size): Do check size of object of integral type
if it is a packed array type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c2
1 files changed, 1 insertions, 1 deletions
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;