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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Using a smaller than declared size for standard loads is a valid and well
defined optimization (sometimes those use less bandwidth, othertimes it is
better for alignment reasons).  The case you are running into is that you don't
want to use that kind of load.  You should not using bitfields directly and
really should be using volatile here.  Volatile definition is exactly what is
needed for hardware registers and IIRC is the real only working case for
volatile these days (the other working case is a variable that changes due to
an interrupt/signal).

Reply via email to