From 798014c58e9e54b068c30e8e2113d278a0bd6e07 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 5 Sep 2017 19:57:56 +0000 Subject: Make mode_for_size_tree return an opt_mode ...for consistency with mode_for_size 2017-09-05 Richard Sandiford 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 --- gcc/ada/gcc-interface/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ada/gcc-interface') 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) -- cgit v1.1