https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87039
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think this shows a pretty major bug caused by the early dwarf changes - it happens too early. When OpenMP/OpenACC etc. does move_sese_region_to_fn, it duplicates the BLOCK which is on the boundary and should stay in both parent and child, but the other BLOCKs are just moved. With early dwarf, we've already created the DW_TAG_lexical_block for those blocks and added them under their parent block. So, either we shouldn't do that during parsing and only create the lexical blocks with early dwarf at the end of the lowering passes, or move_sese_region_to_fn needs to use some debug hook that would reparent the lexical blocks being moved. Also note that for the omp_fn outlined functions we don't really emit any DWARF early at all, dwarf2out_function_decl is called only late from rest_of_handle_final.