Just to add some stuff which can helps: No one will try to compile Koules and trying to understand what Kolues code do , to reproduce that error (its uninteresting and time consuming job). So, you (or that one who catch the bug) , should create small as possible example, with small as possible code, which will cleary show the difference and problems. And only after that if it will indeed bug, it will be fixed.
But from my expirience, i can tell you, that optimisation "bugs" in most cases are not bugs, but problems with code, and the way, how arguments passing to stack, how optimisator works with stack when you use O1/O2/O3 , and , while with O0 some "wrong" code can works, with O1 or O2 it will just works different. I have the same kind of problems with optimisation, when port some function over mui (DoSuperNew), which use hooks, tags and some stuff. And in end, someone on UtilityBase explain all the stuff (i.e. why compiler produce different code for different optimisation flags), and in end, its just forces to my bad code (which works with O1 and not works with O2).
Expectually when you have disabled optimisation at all in compare with any kind of enabled optimisation: its all will reacts different, if some nasty hacks/hooks/code are done in game itself. But to check all of this, need small example, with reducing all un-necessary for reproduce code.
So, if you and author of that programm still think that its reall bug in optimisation, need to create small as possible example, and then, if it indeed bug it will be fixed. But as it now like "some game have optimisation bug when you press P in game" give you no chance that it will be fixed.