https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94235
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:c448a5496842ecde55dce2fd390f6f12911a06c4 commit r10-8735-gc448a5496842ecde55dce2fd390f6f12911a06c4 Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Sep 7 09:54:38 2020 +0200 lto: Stream edge goto_locus [PR94235] The following patch adds streaming of edge goto_locus (both LOCATION_LOCUS and LOCATION_BLOCK from it), the PR shows a testcase (inappropriate for gcc testsuite) where the lack of streaming of goto_locus results in worse debug info. Earlier version of the patch (without the output_function changes) failed miserably, because on the order mismatch - input_function would first input_cfg, then input_eh_regions and then input_bb (all of which now have locations), while output_function used output_eh_regions, then output_bb and then output_cfg. *_cfg went to a separate stream... Now, is there a reason why the order is different? If the intent is that the cfg could be read separately from the rest of function or vice versa, alternatively we'd need to clear_line_info (); before output_eh_regions and before/after output_cfg to make them independent. 2020-09-07 Jakub Jelinek <ja...@redhat.com> PR debug/94235 * lto-streamer-out.c (output_cfg): Also stream goto_locus for edges. Use bp_pack_var_len_unsigned instead of streamer_write_uhwi to stream e->dest->index and e->flags. (output_function): Call output_cfg before output_ssa_name, rather than after streaming all bbs. * lto-streamer-in.c (input_cfg): Stream in goto_locus for edges. Use bp_unpack_var_len_unsigned instead of streamer_read_uhwi to stream in dest_index and edge_flags. (cherry picked from commit fea13fcd0da0353520eb2675ad24c2f296611b85)