public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55882] [4.7/4.8 Regression] unaligned load/store : incorrect struct offset Date: Wed, 09 Jan 2013 11:26:00 -0000 [thread overview] Message-ID: <bug-55882-4-3Xa3mWfmOR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55882-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55882 --- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-09 11:26:10 UTC --- (In reply to comment #8) > Or more correct > > Index: gcc/emit-rtl.c > =================================================================== > --- gcc/emit-rtl.c (revision 195014) > +++ gcc/emit-rtl.c (working copy) > @@ -1839,7 +1839,12 @@ set_mem_attributes_minus_bitpos (rtx ref > > if (!align_computed) > { > - unsigned int obj_align = get_object_alignment (t); > + unsigned int obj_align; > + unsigned HOST_WIDE_INT obj_bitpos; > + get_object_alignment_1 (t, &obj_align, &obj_bitpos); > + obj_bitpos = (obj_bitpos + apply_bitpos) & (obj_align - 1); And actually obj_bitpos = (obj_bitpos - apply_bitpos) & (obj_align - 1); > + if (obj_bitpos != 0) > + obj_align = (obj_bitpos & -obj_bitpos); > attrs.align = MAX (attrs.align, obj_align); > } > }
next prev parent reply other threads:[~2013-01-09 11:26 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-05 1:39 [Bug c/55882] New: " jan.smets@alcatel-lucent.com 2013-01-05 1:44 ` [Bug c/55882] " jan.smets@alcatel-lucent.com 2013-01-07 10:10 ` rguenth at gcc dot gnu.org 2013-01-07 16:21 ` jan.smets@alcatel-lucent.com 2013-01-07 16:22 ` jan.smets@alcatel-lucent.com 2013-01-08 15:07 ` rguenth at gcc dot gnu.org 2013-01-08 15:26 ` rguenth at gcc dot gnu.org 2013-01-08 15:47 ` rguenth at gcc dot gnu.org 2013-01-08 15:55 ` rguenth at gcc dot gnu.org 2013-01-08 21:45 ` jan.smets@alcatel-lucent.com 2013-01-09 10:42 ` [Bug middle-end/55882] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org 2013-01-09 11:26 ` rguenth at gcc dot gnu.org [this message] 2013-01-09 11:36 ` rguenth at gcc dot gnu.org 2013-01-10 9:49 ` jamborm at gcc dot gnu.org 2013-01-15 12:49 ` rguenth at gcc dot gnu.org 2013-01-15 12:54 ` [Bug middle-end/55882] [4.7 " rguenth at gcc dot gnu.org 2013-01-16 9:26 ` rguenth at gcc dot gnu.org 2013-01-16 10:21 ` 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-55882-4-3Xa3mWfmOR@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).