"volatile" seems to have no effect. ReadByte should be called 4 times with
results merged in a word, instead it is called once and replicated 4 times.

arm-none-eabi-gcc -S -Os -mcpu=arm926ej-s src.c

-O0, -O2, -O3 are fine, -O1 and -Os are bad.


-- 
           Summary: [4.5 regression] volatile ignored
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: a dot kaiser at gmx dot net
  GCC host triplet: yagarto 01.05.2010
GCC target triplet: arm-none-eabi


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

Reply via email to