http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58546
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Given that you can't control on where the variables will be layed out, I think this is at worst a possible load data race (if you e.g. store in another thread to b), something you really can't observe other than through watchpoints, emulators etc. Whether the other var is volatile or not IMHO doesn't matter. If it was actually device memory, you'd need to specially lay out the vars using named sections or similar.