This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81273] Wrong code generated for ARM setting volatile struct field with a literal
- From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Jul 2017 14:18:31 +0000
- Subject: [Bug target/81273] Wrong code generated for ARM setting volatile struct field with a literal
- Auto-submitted: auto-generated
- References: <bug-81273-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81273
--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to LdB from comment #3)
> I am stunned you could not build the code the only requirement is you
> include the stdint.h so the uint32_t types are defined. I will fix the typos
> are you really saying you can't compile this?
>
Most compiler developers do not install a complete build environment when
testing bugs. As such, they do not have the headers available. This is why
our bug reporting rules ask you to post _preprocessed_ source code.
You've also failed to give:
The options used to configure the compiler when you built it (see the output of
gcc -v).
The list of options you passed to the compiler when running it. We can only
infer -O2 from your comments.
> Alignment is not really a concern it's a hardware register to the CPU so
> it's a given.
Absolutely alignment is the issue here. Packed says that the object can be on
any alignment boundary and that materially affects the compiler's behaviour
here.