Blog post shows GCC 16.2 can execute unrelated code after undefined behavior
A developer's personal blog post demonstrates that GCC 16.2, when compiling C code that triggers undefined behavior (via std::unreachable() or a null pointer dereference), can generate assembly that executes a completely separate, never-called function. In one example, writing to a 'device_command' variable followed by undefined behavior causes the compiler to also emit code for an unrelated 'explode()' function that was never invoked in the source.