From: Jakub Jelinek Date: Wed, 16 Jan 2019 14:18:47 +0000 (+0100) Subject: re PR c/51628 (__attribute__((packed)) is unsafe in some cases (i.e. add -Waddress... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e964d9b23ad7dc4878294d0119e676c43e1f1ea4;p=gcc.git re PR c/51628 (__attribute__((packed)) is unsafe in some cases (i.e. add -Waddress-of-packed-member, etc.)) PR c/51628 PR target/88682 * c-c++-common/pr51628-10.c (unaligned_int128_t): Add may_alias attribute. From-SVN: r267970 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f032b48a37e..d8f46a03378 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-01-16 Jakub Jelinek + + PR c/51628 + PR target/88682 + * c-c++-common/pr51628-10.c (unaligned_int128_t): Add + may_alias attribute. + 2019-01-15 Nikhil Benesch * gcc.misc-tests/godump-1.c: Add test case for typedef before diff --git a/gcc/testsuite/c-c++-common/pr51628-10.c b/gcc/testsuite/c-c++-common/pr51628-10.c index 085fe1608c4..a09f4ef4efa 100644 --- a/gcc/testsuite/c-c++-common/pr51628-10.c +++ b/gcc/testsuite/c-c++-common/pr51628-10.c @@ -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;