The function simply doesn't handle the new location expression opcodes coming 
from DebugFission (https://gcc.gnu.org/wiki/DebugFission).  Fixed by making it 
handle them like DW_OP_addr and DW_OP_const*.

OK for mainline and the active branches (it's a regression from GCC 5)?


2019-05-27  Eric Botcazou  <ebotca...@adacore.com>

        * dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index
        and DW_OP_GNU_const_index opcodes.


2019-05-27  Eric Botcazou  <ebotca...@adacore.com>

        * gnat.dg/specs/array4.ads: New test.

-- 
Eric Botcazou
Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 271106)
+++ dwarf2out.c	(working copy)
@@ -17906,6 +17906,8 @@ resolve_args_picking_1 (dw_loc_descr_ref
 	case DW_OP_push_object_address:
 	case DW_OP_call_frame_cfa:
 	case DW_OP_GNU_variable_value:
+	case DW_OP_GNU_addr_index:
+	case DW_OP_GNU_const_index:
 	  ++frame_offset_;
 	  break;
 
-- { dg-do compile }
-- { dg-skip-if "missing -gsplit-dwarf support" { *-*-darwin* } }
-- { dg-options "-gsplit-dwarf" }

package Array4 is

  type Arr1 is array (Positive range <>) of Boolean;

  Size : Positive := 20;

  type Rec is record
    A : Arr1 (1 .. Size);
  end record;

  type Arr2 is array (Positive range <>) of Rec;

end Array4;

Reply via email to