diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-09-05 19:57:56 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-09-05 19:57:56 +0000 |
commit | 798014c58e9e54b068c30e8e2113d278a0bd6e07 (patch) | |
tree | 342022676600dfe2e5948350a06d04966f949872 /gcc/ada/gcc-interface/utils.c | |
parent | 3981fbb65a43dff3a81ebc32c94d6f86bb4f9783 (diff) | |
download | gcc-798014c58e9e54b068c30e8e2113d278a0bd6e07.zip gcc-798014c58e9e54b068c30e8e2113d278a0bd6e07.tar.gz gcc-798014c58e9e54b068c30e8e2113d278a0bd6e07.tar.bz2 |
Make mode_for_size_tree return an opt_mode
...for consistency with mode_for_size
2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* stor-layout.h (mode_for_size_tree): Return an opt_mode.
* stor-layout.c (mode_for_size_tree): Likewise.
(mode_for_array): Update accordingly.
(layout_decl): Likewise.
(compute_record_mode): Likewise. Only set the mode once.
gcc/ada/
* gcc-interface/utils.c (make_packable_type): Update call to
mode_for_size_tree.
From-SVN: r251732
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 1c83a08..89dbc8d 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -1080,7 +1080,8 @@ make_packable_type (tree type, bool in_record, unsigned int max_align) in case the record itself contains a BLKmode field. */ if (in_record && TYPE_MODE (new_type) == BLKmode) SET_TYPE_MODE (new_type, - mode_for_size_tree (TYPE_SIZE (new_type), MODE_INT, 1)); + mode_for_size_tree (TYPE_SIZE (new_type), + MODE_INT, 1).else_blk ()); /* If neither mode nor size nor alignment shrunk, return the old type. */ if (TYPE_MODE (new_type) == BLKmode && new_size >= size && max_align == 0) |