public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "raj.khem at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/45819] [4.5 Regression] unexpected unaligned access to volatile int Date: Thu, 09 Jun 2011 06:47:00 -0000 [thread overview] Message-ID: <bug-45819-4-ENepQkGSMk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-45819-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45819 Khem Raj <raj.khem at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |raj.khem at gmail dot com --- Comment #9 from Khem Raj <raj.khem at gmail dot com> 2011-06-09 06:47:01 UTC --- here is another testcase which generates loadbytes with gcc 4.6 but works as expected with gcc 4.5 on arm. gcc are latest from respective branches. and it fails irrespective of having -fstrict-volatile-bitfields or not. struct ehci_regs { char x; unsigned int port_status[0]; } __attribute__ ((packed)); //} __attribute__ ((packed,aligned(__alignof__(int)))); struct ehci_hcd{ struct ehci_regs *regs; }; int ehci_hub_control ( struct ehci_hcd *ehci, int wIndex ) { unsigned int *status_reg = &ehci->regs->port_status[wIndex]; return *(volatile unsigned int *)status_reg; }
next prev parent reply other threads:[~2011-06-09 6:47 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-28 17:51 [Bug c/45819] New: " anemo at mba dot ocn.ne.jp 2010-09-28 18:38 ` [Bug c/45819] " rguenth at gcc dot gnu.org 2010-09-28 19:53 ` anemo at mba dot ocn.ne.jp 2010-09-30 10:00 ` [Bug middle-end/45819] " anemo at mba dot ocn.ne.jp 2010-09-30 11:56 ` rguenth at gcc dot gnu.org 2010-11-12 15:11 ` rguenth at gcc dot gnu.org 2010-11-24 14:43 ` anemo at mba dot ocn.ne.jp 2010-12-16 13:07 ` rguenth at gcc dot gnu.org 2011-02-22 13:40 ` anemo at mba dot ocn.ne.jp 2011-04-28 14:57 ` rguenth at gcc dot gnu.org 2011-06-09 6:47 ` raj.khem at gmail dot com [this message] 2011-07-22 9:50 ` rguenth at gcc dot gnu.org 2011-07-22 11:55 ` rguenth at gcc dot gnu.org 2011-07-22 12:20 ` rguenth at gcc dot gnu.org 2011-07-22 12:20 ` rguenth at gcc dot gnu.org 2011-07-22 12:22 ` rguenth at gcc dot gnu.org 2011-07-22 12:25 ` rguenth at gcc dot gnu.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=bug-45819-4-ENepQkGSMk@http.gcc.gnu.org/bugzilla/ \ --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).