public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sabre at nondot dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/37868] code that breaks TBAA is misoptimized even with -fno-strict-aliasing Date: Sat, 18 Oct 2008 18:30:00 -0000 [thread overview] Message-ID: <20081018182932.15689.qmail@sourceware.org> (raw) In-Reply-To: <bug-37868-15165@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from sabre at nondot dot org 2008-10-18 18:29 ------- Here is the testcase. I should work with -fno-strict-aliasing: #include <stdio.h> #include <stdint.h> struct X { unsigned char pad : 4; uint64_t a : 64; uint64_t b : 60; } __attribute__((packed)); int main (void) { struct X x; uint64_t bad_bits; x.pad = 255; x.a = -1ULL; x.b = -1ULL; bad_bits = ((uint64_t)-1ULL) ^ *(1+(uint64_t *) &x); printf("bad bits: %llx\n", bad_bits); return bad_bits != 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37868
next prev parent reply other threads:[~2008-10-18 18:30 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-18 18:17 [Bug tree-optimization/37868] New: code that doesn't " edwintorok at gmail dot com 2008-10-18 18:30 ` sabre at nondot dot org [this message] 2008-10-18 18:58 ` [Bug tree-optimization/37868] code that " rguenth at gcc dot gnu dot org 2008-10-18 22:36 ` rguenth at gcc dot gnu dot org 2008-10-18 22:44 ` rguenth at gcc dot gnu dot org 2008-10-22 11:48 ` [Bug tree-optimization/37868] [4.3 Regression] " rguenth at gcc dot gnu dot org 2008-10-22 13:50 ` rguenth at gcc dot gnu dot org 2008-11-03 11:29 ` jakub at gcc dot gnu dot org 2008-11-07 12:51 ` rguenth at gcc dot gnu dot org 2008-11-20 12:14 ` rguenth at gcc dot gnu dot org 2008-11-20 12:15 ` rguenth at gcc dot gnu dot org 2008-11-20 12:28 ` rguenth at gcc dot gnu dot org
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=20081018182932.15689.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).