It's not allowed to do a goto into an expression statement. For exemple, it's not well defined what should happen if such an expression is not otherwise reachable and/or can be optimized away. For such situations GCC issues an error, clang doesn't and produce a valid IR but spare produce an invalid IR with branches to unexisting BBs. The goal of the patches in this series is: *) To detect such gotos and issue a sensible error. *) To make the IR somehow valid. Since the original expression has been optimized away, the IR replace the goto by a branch to itself. -- Luc base-commit: 79f7ac984473d031dfb9cef00119c2d542d0d4a6 -- 2.26.0