public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-9205] Fix PR ada/98228
@ 2021-01-26 18:07 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-01-26 18:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:29f721366b718b60d4c72d82e42e1e3d0a6405c2

commit r9-9205-g29f721366b718b60d4c72d82e42e1e3d0a6405c2
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Jan 26 18:54:26 2021 +0100

    Fix PR ada/98228
    
    This is the profiled bootstrap failure for s390x/Linux on the mainline,
    which has been introduced by the modref pass but actually exposing an
    existing issue in the maybe_pad_type function that is visible on s390x.
    
    The issue is too weak a test for the addressability of the inner component.
    
    gcc/ada/
                Marius Hillenbrand  <mhillen@linux.ibm.com>
    
            PR ada/98228
            * gcc-interface/utils.c (maybe_pad_type): Test the size of the new
            packable type instead of its alignment for addressability's sake.

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

diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 4e138195d9e..1509fbfc670 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1387,7 +1387,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
     {
       tree packable_type = make_packable_type (type, true);
       if (TYPE_MODE (packable_type) != BLKmode
-	  && align >= TYPE_ALIGN (packable_type))
+	  && compare_tree_int (TYPE_SIZE (packable_type), align) <= 0)
         type = packable_type;
     }


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

only message in thread, other threads:[~2021-01-26 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 18:07 [gcc r9-9205] Fix PR ada/98228 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).