From: Jakub Jelinek <jakub@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [committed] Fix up pr51628-10.c testcase (PR target/88682)
Date: Wed, 16 Jan 2019 14:22:00 -0000 [thread overview]
Message-ID: <20190116142157.GU30353@tucnak> (raw)
Hi!
This testcase violates aliasing and so is "miscompiled" e.g. on powerpc64
or aarch64 at -O2. Fixed thusly, tested on powerpc64-linux, committed to
trunk as obvious.
2019-01-16 Jakub Jelinek <jakub@redhat.com>
PR c/51628
PR target/88682
* c-c++-common/pr51628-10.c (unaligned_int128_t): Add
may_alias attribute.
--- gcc/testsuite/c-c++-common/pr51628-10.c.jj 2018-12-21 00:40:49.048937834 +0100
+++ gcc/testsuite/c-c++-common/pr51628-10.c 2019-01-16 15:15:51.515279138 +0100
@@ -11,7 +11,7 @@ struct pair_t
typedef struct unaligned_int128_t_
{
__int128_t value;
-} __attribute__((packed)) unaligned_int128_t;
+} __attribute__((packed, may_alias)) unaligned_int128_t;
struct pair_t p = {0, 1};
unaligned_int128_t *addr = (unaligned_int128_t *) &p.i;
Jakub
reply other threads:[~2019-01-16 14:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116142157.GU30353@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).