aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-01-26 18:54:26 +0100
committerEric Botcazou <ebotcazou@adacore.com>2021-01-26 19:03:58 +0100
commit9c41bcc59c237aaa629e271f88c20a90cb8e0af5 (patch)
tree1f46a8e2fa011c9ba5fae9d68425db52479c73f8 /gcc
parent6e44c09b2df7282e0b519f241cf54438ab183b5e (diff)
downloadgcc-9c41bcc59c237aaa629e271f88c20a90cb8e0af5.zip
gcc-9c41bcc59c237aaa629e271f88c20a90cb8e0af5.tar.gz
gcc-9c41bcc59c237aaa629e271f88c20a90cb8e0af5.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/gcc-interface/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index d52220a..c503bfb 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1571,7 +1571,7 @@ maybe_pad_type (tree type, tree size, unsigned int align,
{
tree packable_type = make_packable_type (type, true, align);
if (TYPE_MODE (packable_type) != BLKmode
- && align >= TYPE_ALIGN (packable_type))
+ && compare_tree_int (TYPE_SIZE (packable_type), align) <= 0)
type = packable_type;
}