diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-09-07 10:47:31 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-09-15 15:01:31 +0200 |
commit | 540a1d936d8f73f5e2efdefafd8342ec27773ae8 (patch) | |
tree | 4e910ad62a03d77d9580d96cad2a613e3ea5d2f7 /gcc/ada/gcc-interface/utils.cc | |
parent | d9275e87812a65474be63d565ae4a2eb9a43e9b1 (diff) | |
download | gcc-540a1d936d8f73f5e2efdefafd8342ec27773ae8.zip gcc-540a1d936d8f73f5e2efdefafd8342ec27773ae8.tar.gz gcc-540a1d936d8f73f5e2efdefafd8342ec27773ae8.tar.bz2 |
ada: Fix minor glitch in finish_record_type
The size needs to be rounded up to the storage unit in all cases.
gcc/ada/
* gcc-interface/utils.cc (finish_record_type): Round the size in
the padding case as well.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
-rw-r--r-- | gcc/ada/gcc-interface/utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index d0a13d2..f720f3a 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -2159,7 +2159,7 @@ finish_record_type (tree record_type, tree field_list, int rep_level, /* If this is a padding record, we never want to make the size smaller than what was specified in it, if any. */ if (TYPE_IS_PADDING_P (record_type) && had_size) - size = TYPE_SIZE (record_type); + size = round_up (TYPE_SIZE (record_type), BITS_PER_UNIT); else size = round_up (size, BITS_PER_UNIT); |