diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-04-06 13:38:41 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-04-06 13:38:41 +0000 |
commit | 2d091b12a0466d34d78d696bed390f3792ffe9fa (patch) | |
tree | 48dbf8b603aafa4f20e0e1280351148c61dee829 /gcc/ada | |
parent | 3135ce84cc325bdfb60e62d2d5845ec41b86b691 (diff) | |
download | gcc-2d091b12a0466d34d78d696bed390f3792ffe9fa.zip gcc-2d091b12a0466d34d78d696bed390f3792ffe9fa.tar.gz gcc-2d091b12a0466d34d78d696bed390f3792ffe9fa.tar.bz2 |
decl.c (is_variable_size): Do not unconditionally return false on non-strict alignment platforms.
* decl.c (is_variable_size): Do not unconditionally return false
on non-strict alignment platforms.
From-SVN: r133961
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/decl.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a6f1403..4ed6a52 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2008-04-06 Eric Botcazou <ebotcazou@adacore.com> + * decl.c (is_variable_size): Do not unconditionally return false + on non-strict alignment platforms. + +2008-04-06 Eric Botcazou <ebotcazou@adacore.com> + * decl.c (rest_of_type_decl_compilation_no_defer): New local function used to process all the variants of the specified type. (gnat_to_gnu_entity): Invoke rest_of_type_decl_compilation for enumeral diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index e31b525..bda144e 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -6103,18 +6103,17 @@ is_variable_size (tree type) { tree field; - /* We need not be concerned about this at all if we don't have - strict alignment. */ - if (!STRICT_ALIGNMENT) - return false; - else if (!TREE_CONSTANT (TYPE_SIZE (type))) + if (!TREE_CONSTANT (TYPE_SIZE (type))) return true; - else if (TREE_CODE (type) == RECORD_TYPE && TYPE_IS_PADDING_P (type) - && !TREE_CONSTANT (DECL_SIZE (TYPE_FIELDS (type)))) + + if (TREE_CODE (type) == RECORD_TYPE + && TYPE_IS_PADDING_P (type) + && !TREE_CONSTANT (DECL_SIZE (TYPE_FIELDS (type)))) return true; - else if (TREE_CODE (type) != RECORD_TYPE - && TREE_CODE (type) != UNION_TYPE - && TREE_CODE (type) != QUAL_UNION_TYPE) + + if (TREE_CODE (type) != RECORD_TYPE + && TREE_CODE (type) != UNION_TYPE + && TREE_CODE (type) != QUAL_UNION_TYPE) return false; for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) |