public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107498] Wrong optimization leads to unaligned access when compiling OpenLDAP Date: Tue, 01 Nov 2022 20:23:23 +0000 [thread overview] Message-ID: <bug-107498-4-mSvaoPwJ65@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107498-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107498 Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-11-01 Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 --- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- Note that the fields are marked volatile in the source: union { struct { volatile indx_t pb_lower; volatile indx_t pb_upper; } pb; uint32_t pb_pages; } mp_pb; But, yes, it looks like something went wrong earlier: mp is a pointer to MDB_page, which is a structure containing a union containing a uint32_t field, which gives it an alignment of 4 bytes, so mp must be a multiple of 4. mp_pb is a union containing a uint32_t field so it is at an offset multiple of 4. So &mp->mp_pb.pb must be a multiple of 4 and, assuming that it is contained in %l0, the instruction: 0x00000100000c8aec <+300>: st %l3, [ %l0 + 0xc ] would therefore be legal. Can anyone print the value of mp in the debugger?
next prev parent reply other threads:[~2022-11-01 20:23 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-01 16:54 [Bug c/107498] New: " glaubitz at physik dot fu-berlin.de 2022-11-01 16:57 ` [Bug middle-end/107498] " pinskia at gcc dot gnu.org 2022-11-01 17:04 ` jrtc27 at jrtc27 dot com 2022-11-01 17:08 ` glaubitz at physik dot fu-berlin.de 2022-11-01 17:18 ` pinskia at gcc dot gnu.org 2022-11-01 20:23 ` ebotcazou at gcc dot gnu.org [this message] 2022-11-01 21:53 ` glaubitz at physik dot fu-berlin.de 2022-11-01 21:55 ` glaubitz at physik dot fu-berlin.de 2022-11-12 10:14 ` glaubitz at physik dot fu-berlin.de 2022-11-13 10:14 ` ebotcazou at gcc dot gnu.org 2022-11-13 10:33 ` glaubitz at physik dot fu-berlin.de 2022-11-13 10:56 ` ebotcazou 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-107498-4-mSvaoPwJ65@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).