https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108132
--- Comment #1 from qinzhao at gcc dot gnu.org ---
As we checked the assembly and the IR, the wrong transformation is something
like the following at source code level: (inside function "main")
from :
a=f(a);
b=true;
to:
b=true;
a=f(a)
since there is a "longjmp" inside the function "f", I think that it's not
correct to move b=true before the function call.
I think that the function "f" which has a "longjmp" should be treated as a
memory barrier, any insn movement should not across it.
This problem exists back to gcc8.