This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66110] uint8_t memory access not optimized
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 May 2015 09:17:53 +0000
- Subject: [Bug middle-end/66110] uint8_t memory access not optimized
- Auto-submitted: auto-generated
- References: <bug-66110-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66110
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, it for example breaks bootstrap via (broken...) -Wstrict-aliasing:
In file included from
/space/rguenther/src/svn/trunk/gcc/../libdecnumber/bid/decimal128Local.h:1:0,
from /space/rguenther/src/svn/trunk/gcc/dfp.c:43:
/space/rguenther/src/svn/trunk/gcc/dfp.c: In function âbool
decimal_real_arithmetic(real_value*, tree_code, const real_value*, const
real_value*)â:
/space/rguenther/src/svn/trunk/gcc/../libdecnumber/dpd/decimal128Local.h:40:8:
error: dereferencing type-punned pointer will break strict-aliasing rules
[-Werror=strict-aliasing]
{ (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] ^= 0x80; }
^
/space/rguenther/src/svn/trunk/gcc/dfp.c:704:2: note: in expansion of macro
âdecimal128FlipSignâ
decimal128FlipSign ((decimal128 *) r->sig);
^
/space/rguenther/src/svn/trunk/gcc/../libdecnumber/dpd/decimal128Local.h:36:8:
error: dereferencing type-punned pointer will break strict-aliasing rules
[-Werror=strict-aliasing]
{ (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] &= ~0x80; }
^
/space/rguenther/src/svn/trunk/gcc/dfp.c:714:2: note: in expansion of macro
âdecimal128ClearSignâ
decimal128ClearSign ((decimal128 *) r->sig);
^
/space/rguenther/src/svn/trunk/gcc/dfp.c: In function âvoid
decimal_real_maxval(real_value*, int, machine_mode)â:
/space/rguenther/src/svn/trunk/gcc/../libdecnumber/dpd/decimal128Local.h:32:8:
error: dereferencing type-punned pointer will break strict-aliasing rules
[-Werror=strict-aliasing]
{ (d)->bytes[WORDS_BIGENDIAN ? 0 : 15] |= ((unsigned) (b) << 7); }
^
/space/rguenther/src/svn/trunk/gcc/dfp.c:754:5: note: in expansion of macro
âdecimal128SetSignâ
decimal128SetSign ((decimal128 *) r->sig, 1);
^
cc1plus: all warnings being treated as errors
make[3]: *** [dfp.o] Error 1
I remember dfp.c _does_ violate strict-aliasing. Trying --disable-werror.