diff options
author | Richard Biener <rguenther@suse.de> | 2017-01-25 09:48:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-01-25 09:48:10 +0000 |
commit | 5c628c3e6f1af513a644fcdb7b18ef8945087e64 (patch) | |
tree | 83666106fed94ec82bcc9d3ccff6ed8264722ae0 /gcc/omp-expand.c | |
parent | 9078cd3665d56091735c386dffaa0105d58ba070 (diff) | |
download | gcc-5c628c3e6f1af513a644fcdb7b18ef8945087e64.zip gcc-5c628c3e6f1af513a644fcdb7b18ef8945087e64.tar.gz gcc-5c628c3e6f1af513a644fcdb7b18ef8945087e64.tar.bz2 |
re PR debug/78363 (ICE in in force_type_die, at dwarf2out.c:24864)
2017-01-25 Richard Biener <rguenther@suse.de>
PR debug/78363
* omp-expand.c: Include debug.h.
(expand_omp_taskreg): Make sure to generate early debug before
outlining anything from a function.
(expand_omp_target): Likewise.
(grid_expand_target_grid_body): Likewise.
* g++.dg/gomp/pr78363-1.C: New testcase.
* g++.dg/gomp/pr78363-2.C: Likewise.
* g++.dg/gomp/pr78363-3.C: Likewise.
From-SVN: r244892
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r-- | gcc/omp-expand.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 1de3cd4..327c2e7 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see #include "gomp-constants.h" #include "gimple-pretty-print.h" #include "hsa-common.h" +#include "debug.h" /* OMP region information. Every parallel and workshare @@ -1305,6 +1306,11 @@ expand_omp_taskreg (struct omp_region *region) else block = gimple_block (entry_stmt); + /* Make sure to generate early debug for the function before + outlining anything. */ + if (! gimple_in_ssa_p (cfun)) + (*debug_hooks->early_global_decl) (cfun->decl); + new_bb = move_sese_region_to_fn (child_cfun, entry_bb, exit_bb, block); if (exit_bb) single_succ_edge (new_bb)->flags = EDGE_FALLTHRU; @@ -7016,6 +7022,11 @@ expand_omp_target (struct omp_region *region) gsi_remove (&gsi, true); } + /* Make sure to generate early debug for the function before + outlining anything. */ + if (! gimple_in_ssa_p (cfun)) + (*debug_hooks->early_global_decl) (cfun->decl); + /* Move the offloading region into CHILD_CFUN. */ block = gimple_block (entry_stmt); @@ -7589,6 +7600,11 @@ grid_expand_target_grid_body (struct omp_region *target) init_tree_ssa (cfun); pop_cfun (); + /* Make sure to generate early debug for the function before + outlining anything. */ + if (! gimple_in_ssa_p (cfun)) + (*debug_hooks->early_global_decl) (cfun->decl); + tree old_parm_decl = DECL_ARGUMENTS (kern_fndecl); gcc_assert (!DECL_CHAIN (old_parm_decl)); tree new_parm_decl = copy_node (DECL_ARGUMENTS (kern_fndecl)); |