On Oct 7, 2021, at 4:59 PM, Gary Guo [off-list ref] wrote:
I should probably say that doing LTO or not wouldn't make a UB-free
program exhibit UB (assuming LLVM doesn't introduce any during LTO).
Yes, but LTO makes certain types of UB – the types that exist mainly to enable compiler optimizations – more likely to cause actual misbehavior. But that’s no different from C. Though, Rust code does tend to make more aggressive use of inlining than C code, and then there’s the whole saga with noalias…