[Bug c++/70848] New: g++ arm-none-eabi ignores volatile qualifier

hendrikborghorst at googlemail dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 28 12:07:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70848

            Bug ID: 70848
           Summary: g++ arm-none-eabi ignores volatile qualifier
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hendrikborghorst at googlemail dot com
  Target Milestone: ---

Created attachment 38362
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38362&action=edit
Minimal example

After updating my g++ to version 6.1 (from 5.3) I've notived that my volatile
IO access in my arm (arm-none-eabi) research OS gets optimized out with -O1,-O2
and -O3.

I've also checked the amd64-elf variant and it works correct.

The minimal example worked on g++ 5.3 and before but with 6.1 only one STR
instruction is executed instead of three.

g++ info:

$ arm-none-eabi-g++ -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-g++
COLLECT_LTO_WRAPPER=/home/hendrik/sources/gcc-6.1/arm-none-eabi/libexec/gcc/arm-none-eabi/6.1.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-6.1.0/configure --target=arm-none-eabi
--prefix=/home/hendrik/sources/gcc-6.1/arm-none-eabi --disable-nls
--enable-languages=c,c++ --without-headers
Thread model: single
gcc version 6.1.0 (GCC


More information about the Gcc-bugs mailing list