https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117464
Серёжа Празднов <prazdnovserg at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Resolution|INVALID |FIXED --- Comment #4 from Серёжа Празднов <prazdnovserg at gmail dot com> --- (In reply to Andrew Pinski from comment #3) > You can place an compiler barrier after the update of the pointer though > like so: > ``` > AllocatedMemBlocks[1].MemBlockPtr -= 10; > asm("":::"memory"); > ``` > > Which will "Fix" the issue but that is just workaround the overall aliasing > violation you have. Thanks, i'll try to rewrite code. Is it possible to avoid memory fragmentation moving data and pointers to it?