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/decl.c | |
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/decl.c')
-rw-r--r-- | gcc/ada/decl.c | 19 |
1 files changed, 9 insertions, 10 deletions
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)) |