public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7910] ada: Fix minor glitch in finish_record_type
@ 2023-09-27  8:28 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2023-09-27  8:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:51555893149dab8a6861d5b3c41e0ba3e2ed7372

commit r13-7910-g51555893149dab8a6861d5b3c41e0ba3e2ed7372
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Thu Sep 7 10:47:31 2023 +0200

    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.

Diff:
---
 gcc/ada/gcc-interface/utils.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc
index 392ec0b7f4e..be91a9d562e 100644
--- a/gcc/ada/gcc-interface/utils.cc
+++ b/gcc/ada/gcc-interface/utils.cc
@@ -2155,7 +2155,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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-27  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27  8:28 [gcc r13-7910] ada: Fix minor glitch in finish_record_type Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).