diff options
author | Richard Biener <rguenther@suse.de> | 2017-08-24 13:41:51 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-08-24 13:41:51 +0000 |
commit | 5d52d2c949fe6277fd1f31be8d6f48e1dae06652 (patch) | |
tree | 8e50adc3a6b6454612de0fd8e165e999f57aac98 /gcc/cgraphunit.c | |
parent | 6eb191429843d14d2eb3912aa4f23f236ce773b5 (diff) | |
download | gcc-5d52d2c949fe6277fd1f31be8d6f48e1dae06652.zip gcc-5d52d2c949fe6277fd1f31be8d6f48e1dae06652.tar.gz gcc-5d52d2c949fe6277fd1f31be8d6f48e1dae06652.tar.bz2 |
re PR debug/81936 (ICE in dwarf2out_die_ref_for_decl, at dwarf2out.c:5543)
2017-08-24 Richard Biener <rguenther@suse.de>
PR debug/81936
* dwarf2out.c (output_die): Handle flag_generate_offload like
flag_generate_lto.
(output_comp_unit): Likewise.
(gen_array_type_die): Likewise.
(dwarf2out_early_finish): Likewise.
(note_variable_value_in_expr): Likewise.
(dwarf2out_finish): Likewise. Adjust assert.
* cgraphunit.c (symbol_table::compile): Move setting of
flag_generate_offload earlier ...
(symbol_table::finalize_compilation_unit): ... here, before
early debug finalization.
From-SVN: r251332
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index e8cc765..a287f0d 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2464,10 +2464,6 @@ symbol_table::compile (void) fprintf (stderr, "Performing interprocedural optimizations\n"); state = IPA; - /* Offloading requires LTO infrastructure. */ - if (!in_lto_p && g->have_offload) - flag_generate_offload = 1; - /* If LTO is enabled, initialize the streamer hooks needed by GIMPLE. */ if (flag_generate_lto || flag_generate_offload) lto_streamer_hooks_init (); @@ -2614,6 +2610,10 @@ symbol_table::finalize_compilation_unit (void) /* Gimplify and lower thunks. */ analyze_functions (/*first_time=*/false); + /* Offloading requires LTO infrastructure. */ + if (!in_lto_p && g->have_offload) + flag_generate_offload = 1; + if (!seen_error ()) { /* Emit early debug for reachable functions, and by consequence, |