[Bug rtl-optimization/67644] double load on volatile bitfield mem

2015-09-20 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67644 --- Comment #3 from Oleg Endo --- It somehow makes sense ... x->ICR0.BIT.BIT5 |= 1; or maybe better x->ICR0.BIT.BIT5 ^= 1; is a bitfield read and a bitfield write. A bitfield write implies a bitfield read-modify-write, and thus we get two

[Bug rtl-optimization/67644] double load on volatile bitfield mem

2015-09-20 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67644 --- Comment #4 from Oleg Endo --- Hm, maybe it'd be good to add a warning (enabled by default, can be disabled) if volatile bitfields are used. To me it looks like volatile bitfields have almost no use (the way they are implemented by GCC now) a

[Bug rtl-optimization/67644] double load on volatile bitfield mem

2015-09-26 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67644 --- Comment #5 from Oleg Endo --- Possibly related: PR 50521, PR 56997