https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118198
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- main.cold: .LFSB14: .L16: .cfi_def_cfa_offset 16 .cfi_offset 3, -16 .LBB17: .LBB12: .loc 1 9 3 is_stmt 1 view -0 call abort .LVL22: .LBE12: .LBE17: .cfi_endproc .LFE14: .uleb128 0x24 # (DIE (0xa81) DW_TAG_inlined_subroutine) .long 0xc95 # DW_AT_abstract_origin .quad .LBI10 # DW_AT_entry_pc .byte .LVU50 # DW_AT_GNU_entry_view .long .LLRL6 # DW_AT_ranges .byte 0x1 # DW_AT_call_file (main.c) .byte 0x29 # DW_AT_call_line .byte 0x2 # DW_AT_call_column .long 0xab5 # DW_AT_sibling .uleb128 0x14 # (DIE (0xa9a) DW_TAG_formal_parameter) .long 0xca2 # DW_AT_abstract_origin .long .LLST7 # DW_AT_location .long .LVUS7 # DW_AT_GNU_locviews .uleb128 0x25 # (DIE (0xaa7) DW_TAG_call_site) .quad .LVL22 # DW_AT_call_return_pc .long 0xa10 # DW_AT_call_origin .byte 0 # end of children of DIE 0xa81 There is not much to be done here as GCC with optimization is combining all of the abort functions into one. There is no way with optimizations to represent this. The best option is use assert instead of abort which then will print out the line # instead.