https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81936
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 23 Aug 2017, vries at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81936 > > --- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> --- > > what failed to properly set its parent? > > dwarf2out_early_finish contains: > ... > /* Do not generate DWARF assembler now when not producing LTO bytecode. */ > if (!flag_generate_lto) > return; > ... > and this is triggered, so we never get to: > ... > /* Stick a unique symbol to the main debuginfo section. */ > compute_comp_unit_symbol (comp_unit_die ()); > ... > > The if condition should probably test for flag_generate_offload as well. Ah, yeah. And we can have both, right? So we'd either need a separate set of early debug sections or use a combined for both (this is what will happen if you add && !flag_generate_offload I guess).