https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118198
Andi Kleen <andi-gcc at firstfloor dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andi-gcc at firstfloor dot org --- Comment #4 from Andi Kleen <andi-gcc at firstfloor dot org> --- Actually assuming the culprit is tail-merge it already has a black list of functions it won't merge: if (is_gimple_call (stmt1) && gimple_call_internal_p (stmt1)) switch (gimple_call_internal_fn (stmt1)) { case IFN_UBSAN_NULL: case IFN_UBSAN_BOUNDS: case IFN_UBSAN_VPTR: case IFN_UBSAN_CHECK_ADD: case IFN_UBSAN_CHECK_SUB: case IFN_UBSAN_CHECK_MUL: case IFN_UBSAN_OBJECT_SIZE: case IFN_UBSAN_PTR: case IFN_ASAN_CHECK: /* For these internal functions, gimple_location is an implicit parameter, which will be used explicitly after expansion. Merging these statements may cause confusing line numbers in sanitizer messages. */ return gimple_location (stmt1) == gimple_location (stmt2); default: break; } Would just need to add __builtin_abort there too?