https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81936

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-08-24
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, I think this isn't really offloading specific.  We emit locations with
DW_OP_GNU_variable_value optimistically as dw_val_class_decl_ref and later
either resolve those to a dw_val_class_die_ref or drop them
(resolve_addr_in_expr).

For early LTO we have the machinery in note_variable_value_in_expr to
workaround this early (until we find a better way).

Ah...

static void
note_variable_value_in_expr (dw_die_ref die, dw_loc_descr_ref loc)
{
  for (; loc; loc = loc->dw_loc_next)
    if (loc->dw_loc_opc == DW_OP_GNU_variable_value
        && loc->dw_loc_oprnd1.val_class == dw_val_class_decl_ref)
      {
        tree decl = loc->dw_loc_oprnd1.v.val_decl_ref;
        dw_die_ref ref = lookup_decl_die (decl);
        if (! ref && flag_generate_lto)
          {

|| flag_generate_offload missing...

and we run into:

> ./cc1 -quiet pr66714.c -fopenmp -g
pr66714.c:17:1: internal compiler error: in calc_die_sizes, at dwarf2out.c:9131
 }
 ^
0xa4c29f calc_die_sizes
        /tmp/trunk2/gcc/dwarf2out.c:9130
0xa4c2f9 calc_die_sizes
        /tmp/trunk2/gcc/dwarf2out.c:9135
0xa4f31c output_comp_unit
        /tmp/trunk2/gcc/dwarf2out.c:10432
0xa81c71 dwarf2out_finish
        /tmp/trunk2/gcc/dwarf2out.c:30022
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

more flag_generate-offload missing.

Reply via email to