https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68860
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> --- So with LTO early debug I now get proper debug decls but still no locations for the parameters <1><1ff>: Abbrev Number: 10 (DW_TAG_subprogram) <200> DW_AT_abstract_origin: <0x28b> <204> DW_AT_low_pc : 0x400570 <20c> DW_AT_high_pc : 0x47 <214> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <216> DW_AT_GNU_all_call_sites: 1 <2><216>: Abbrev Number: 11 (DW_TAG_formal_parameter) <217> DW_AT_abstract_origin: <0x2dc> <21b> DW_AT_location : 0x37 (location list) <2><21f>: Abbrev Number: 4 (DW_TAG_formal_parameter) <220> DW_AT_abstract_origin: <0x2d1> <2><224>: Abbrev Number: 4 (DW_TAG_formal_parameter) <225> DW_AT_abstract_origin: <0x2c6> ... vs. non-LTO -O2: <1><282>: Abbrev Number: 13 (DW_TAG_subprogram) <283> DW_AT_abstract_origin: <0x1fa> <287> DW_AT_low_pc : 0x400570 <28f> DW_AT_high_pc : 0x47 <297> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <299> DW_AT_GNU_all_call_sites: 1 <2><299>: Abbrev Number: 14 (DW_TAG_formal_parameter) <29a> DW_AT_abstract_origin: <0x24c> <29e> DW_AT_location : 0x37 (location list) <2><2a2>: Abbrev Number: 15 (DW_TAG_formal_parameter) <2a3> DW_AT_abstract_origin: <0x241> <2a7> DW_AT_location : 6 byte block: fa e6 0 0 0 9f (DW_OP_GNU_parameter_ref: <0x241>; DW_OP_stack_value) the .optimized GIMPLE looks the same (and early LTO debug does stream DECL_ABSTRACT_ORIGIN). var-tracking only has NOTE_INSN_VAR_LOCATION for arg7 though. Initial RTL looks the same: ;; # DEBUG arg2 s=> arg2 (debug_insn 8 7 0 (var_location:SI arg2 (const_int 0 [0]) [uninit]) -1 (nil)) ... Looks like var-tracking misses to add all (note 63 62 64 2 (var_location arg1 (debug_parameter_ref:SI arg1)) NOTE_INSN_VAR_LOCATION) (note 64 63 65 2 (var_location arg2 (debug_parameter_ref:SI arg2)) NOTE_INSN_VAR_LOCATION) (note 65 64 66 2 (var_location arg3 (debug_parameter_ref:SI arg3)) NOTE_INSN_VAR_LOCATION) (note 66 65 67 2 (var_location arg4 (debug_parameter_ref:SI arg4)) NOTE_INSN_VAR_LOCATION) (note 67 66 68 2 (var_location arg5 (debug_parameter_ref:SI arg5)) NOTE_INSN_VAR_LOCATION) (note 68 67 44 2 (var_location arg6 (debug_parameter_ref:SI arg6)) NOTE_INSN_VAR_LOCATION) ah, because DECL_HAS_DEBUG_ARGS_P and friends has not been LTOed yet.