This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/81273] Wrong code generated for ARM setting volatile struct field with a literal


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

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
The compiler gave you what you asked for (though it might not have been what
you wanted, or even expected).  Optimization is irrelevant here.

Just because the address you finally assigned to the structure was aligned
doesn't mean that the compiler can change the access pattern for a volatile
object.  You'd hardly expect that changing base_addr to 0x3f000001 would change
the sequence of loads and stores generated, surely?  And don't forget that
unaligned accesses to DEVICE memory are undefined.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]