When building the test with ubsan (-fsanitize=undefined), compiler generates unconditional trap in ‘foo’. For such cases, warnings will be useful.
; Function Attrs: mustprogress nofree noinline norecurse noreturn nosync nounwind willreturn memory(none) uwtable
define dso_local noundef range(i32 6, 9) i32 @foo() local_unnamed_addr #2 !func_sanitize !13 {
unreachable
}