public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/58041] New: Unaligned access to arrays in packed structure
@ 2013-08-01  7:26 bernd.edlinger at hotmail dot de
  2013-08-01  7:31 ` [Bug middle-end/58041] " bernd.edlinger at hotmail dot de
                   ` (39 more replies)
  0 siblings, 40 replies; 41+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2013-08-01  7:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58041

            Bug ID: 58041
           Summary: Unaligned access to arrays in packed structure
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

the attached test case shows unaligned accesses can be generated
on arm architecture, despite the -mno-unaligned-access option.
This does not happen at -O0 and -Og,
but it always happens at at -Os -O1 -O2 and -O3 to name a few.

assembler output for foo shows unaligned opcodes:

foo:
        @ Function supports interworking.
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        add     ip, r0, r1, asl #3
        add     r1, ip, #1
        ldmia   r1, {r0-r1}
        str     r2, [ip, #1]
        str     r3, [ip, #5]
        bx      lr

reproduced with latest trunk:

  $ ../gcc-4.9-20130728/configure --target=arm-eabi
--prefix=/home/ed/gnu/arm-eabi --with-newlib --enable-languages=c,c++
--disable-hosted-libstdcxx --disable-__cxa_atexit


^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2013-08-06 18:19 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01  7:26 [Bug middle-end/58041] New: Unaligned access to arrays in packed structure bernd.edlinger at hotmail dot de
2013-08-01  7:31 ` [Bug middle-end/58041] " bernd.edlinger at hotmail dot de
2013-08-01  9:09 ` mikpe at it dot uu.se
2013-08-01 11:36 ` mikpe at it dot uu.se
2013-08-01 11:51 ` mikpe at it dot uu.se
2013-08-01 13:26 ` wschmidt at gcc dot gnu.org
2013-08-01 16:18 ` wschmidt at gcc dot gnu.org
2013-08-01 16:23 ` jamborm at gcc dot gnu.org
2013-08-01 16:48 ` jamborm at gcc dot gnu.org
2013-08-01 17:27 ` jamborm at gcc dot gnu.org
2013-08-01 17:49 ` wschmidt at gcc dot gnu.org
2013-08-01 17:54 ` wschmidt at gcc dot gnu.org
2013-08-01 18:17 ` bernd.edlinger at hotmail dot de
2013-08-01 18:29 ` wschmidt at gcc dot gnu.org
2013-08-01 18:32 ` wschmidt at gcc dot gnu.org
2013-08-01 19:09 ` bernd.edlinger at hotmail dot de
2013-08-01 19:20 ` wschmidt at gcc dot gnu.org
2013-08-01 19:36 ` mikpe at it dot uu.se
2013-08-01 23:06 ` jamborm at gcc dot gnu.org
2013-08-02 15:22 ` wschmidt at gcc dot gnu.org
2013-08-02 15:28 ` wschmidt at gcc dot gnu.org
2013-08-02 15:54 ` ebotcazou at gcc dot gnu.org
2013-08-02 16:06 ` wschmidt at gcc dot gnu.org
2013-08-02 16:58 ` jamborm at gcc dot gnu.org
2013-08-02 17:12 ` wschmidt at gcc dot gnu.org
2013-08-02 18:07 ` wschmidt at gcc dot gnu.org
2013-08-03  8:31 ` bernd.edlinger at hotmail dot de
2013-08-05 17:43 ` jamborm at gcc dot gnu.org
2013-08-06 11:59 ` jamborm at gcc dot gnu.org
2013-08-06 14:24 ` bernd.edlinger at hotmail dot de
2013-08-06 15:18 ` jamborm at gcc dot gnu.org
2013-08-06 15:19 ` jamborm at gcc dot gnu.org
2013-08-06 15:33 ` bernd.edlinger at hotmail dot de
2013-08-06 15:56 ` bernd.edlinger at hotmail dot de
2013-08-06 16:06 ` jamborm at gcc dot gnu.org
2013-08-06 16:12 ` bernd.edlinger at hotmail dot de
2013-08-06 16:36 ` bernd.edlinger at hotmail dot de
2013-08-06 16:59 ` jamborm at gcc dot gnu.org
2013-08-06 17:07 ` bernd.edlinger at hotmail dot de
2013-08-06 17:37 ` jamborm at gcc dot gnu.org
2013-08-06 18:19 ` wschmidt at gcc dot gnu.org

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).