re PR debug/87039 (DW_OP_fbreg used without a frame base on a C++ code w/ -fopenmp)
authorJakub Jelinek <jakub@redhat.com>
Mon, 19 Nov 2018 13:44:13 +0000 (14:44 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 19 Nov 2018 13:44:13 +0000 (14:44 +0100)
commit4ccc4e30141613c4585a0497e050cb5deda06007
tree7727a592dda3ece4affda62848329336a44d8219
parente48e04f598c89a71a5aff3f02cb38b7bf06b5b2b
re PR debug/87039 (DW_OP_fbreg used without a frame base on a C++ code w/ -fopenmp)

PR debug/87039
* omp-expand.c: Don't include debug.h.
(adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
from innermost outer parallel, task, teams or target that has a
child_fn set, or, if there is no such outer region, use
current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
whether a suitable BLOCK is found or not.
(expand_parallel_call, expand_teams_call): Don't call
adjust_context_and_scope here.
(grid_expand_target_grid_body): Revert 2017-01-25 changes.
(expand_omp_taskreg, expand_omp_target): Likewise.  Call
adjust_context_and_scope.
* dwarf2out.c (dwarf2out_early_global_decl): For
decl_function_context recurse instead of calling dwarf2out_decl.

* g++.dg/gomp/pr78363-4.C: New test.
* g++.dg/gomp/pr78363-5.C: New test.
* g++.dg/gomp/pr78363-6.C: New test.
* g++.dg/gomp/pr78363-7.C: New test.

From-SVN: r266272
gcc/ChangeLog
gcc/dwarf2out.c
gcc/omp-expand.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/gomp/pr78363-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/pr78363-5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/pr78363-6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/gomp/pr78363-7.C [new file with mode: 0644]