In common/IErrors.cpp, IErrors_Halt() stops the plugin with:
*((int *)0) = 0xDEADBEEF;
This is undefined behavior. Some compilers (e.g. clang and clang-cl) will always optimize this out.
In order to achieve the desired result, the function body needs to be either:
*((volatile int*)0) = 0xDEADBEEF
or, using an x86ism:
__asm__ __volatile__("ud2");
__builtin_unreachable();