https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438
--- Comment #21 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Dominique d'Humieres from comment #20) > Still present at revision 203491 and the patch in comment #14 does not help. Trivial reproducer: ===== __attribute__((noinline)) void foo (void) { __builtin_unreachable(); } int main (int ac, char *av[]) { foo (); return 0; } ===== As Mike surmises this is another case where we emit code that does not comply with the "atom model" that ld64 (and lld) uses. foo() and main() both end up empty for -O > 0. ==== Mike: any thoughts on this? - seems you were intending to take a look. (it also breaks bootstrapping llvm with GCC in Release mode)