https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87039
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 45006 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45006&action=edit gcc9-pr87039.patch Untested fix. As mentioned on IRC, starting with r253335 we set DECL_CONTEXT that the r241023 code then uses to make sure we emit early debug info of main before main.omp_fn.0. But it is undesirable to emit early debug info before actually outlining the regions. So, by reverting the omp-expand.c part of r244892 the pr78363-*.C testcases still work and: $ ./cc1plus.vanilla -quiet -g -O2 -fopenmp pr87039.C ; g++ -c -fopenmp -o pr87039{.o,.s}; readelf -wi pr87039.o | grep without; echo == <13a> DW_AT_location : 2 byte block: 91 68 (DW_OP_fbreg: -24) [without DW_AT_frame_base] <157> DW_AT_GNU_call_site_value: 2 byte block: 91 68 (DW_OP_fbreg: -24) [without DW_AT_frame_base] == $ ./cc1plus -quiet -g -O2 -fopenmp pr87039.C ; g++ -c -fopenmp -o pr87039{.o,.s}; readelf -wi pr87039.o | grep without; echo == == No testcase in this patch, we don't have the guality infrastructure in libgomp testing.