diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2007-09-08 10:02:28 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-09-08 10:02:28 +0000 |
commit | d9e161ce8f4097b04ab05121fed4f79c9bb609f6 (patch) | |
tree | a6ea51cc23507f13421159b63f8269f06f0fb1da /gcc/ada | |
parent | dab1260138c4b5347270ecd535428116b2acab72 (diff) | |
download | gcc-d9e161ce8f4097b04ab05121fed4f79c9bb609f6.zip gcc-d9e161ce8f4097b04ab05121fed4f79c9bb609f6.tar.gz gcc-d9e161ce8f4097b04ab05121fed4f79c9bb609f6.tar.bz2 |
decl.c (make_packable_type): If the new type has been given BLKmode, try again to get an integral mode for it.
* decl.c (make_packable_type): If the new type has been given BLKmode,
try again to get an integral mode for it.
From-SVN: r128266
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/decl.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b9e57da..e23d6b8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2007-09-08 Eric Botcazou <ebotcazou@adacore.com> + + * decl.c (make_packable_type): If the new type has been given BLKmode, + try again to get an integral mode for it. + 2007-09-07 Eric Botcazou <ebotcazou@adacore.com> Re-apply accidentally reverted change: diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index c293cea..7a01327 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -5218,6 +5218,13 @@ make_packable_type (tree type) finish_record_type (new_type, nreverse (field_list), 1, true); copy_alias_set (new_type, type); + + /* Try harder to get a packable type if necessary, for example + in case the record itself contains a BLKmode field. */ + if (TYPE_MODE (new_type) == BLKmode) + TYPE_MODE (new_type) + = mode_for_size_tree (TYPE_SIZE (new_type), MODE_INT, 1); + return TYPE_MODE (new_type) == BLKmode ? type : new_type; } |