https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69482
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 28 Jan 2016, wipedout at yandex dot ru wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69482 > > --- Comment #6 from wipedout at yandex dot ru --- > The explanations sound reasonable so far. Yet I expect that this problem will > be reported again and again because WOW A SECURITY HOLE so perhaps it'd be > reasonable to change gcc behavior so that when source code contains writes > through volatile pointers then the variable overwritten is actually allocated > in memory and writes are emitted. That would make machine code emitted more > predictable. Agreed and I'd argue it is a bug that we don't do that (well a QOI issue). Unfortunately it's not a trivial task to implement that; overloading TREE_ADDRESSABLE with two semantics, "possibly has its address taken" and "needs to live in memory", makes it harder than necessary.