re PR debug/89498 (ICE in AT_loc_list, at dwarf2out.c:4871)
authorJakub Jelinek <jakub@redhat.com>
Wed, 13 Mar 2019 20:22:15 +0000 (21:22 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 13 Mar 2019 20:22:15 +0000 (21:22 +0100)
PR debug/89498
* dwarf2out.c (size_of_die): For dw_val_class_view_list always use
DWARF_OFFSET_SIZE.
(value_format): For dw_val_class_view_list never use DW_FORM_loclistx.

From-SVN: r269661

gcc/ChangeLog
gcc/dwarf2out.c

index cda44b8e0ffaaed7220a7069bef5651b869b6b3f..7c5bda1d2885eaa6e5869217a86b6c5de7706c0e 100644 (file)
@@ -1,3 +1,10 @@
+2019-03-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/89498
+       * dwarf2out.c (size_of_die): For dw_val_class_view_list always use
+       DWARF_OFFSET_SIZE.
+       (value_format): For dw_val_class_view_list never use DW_FORM_loclistx.
+
 2019-03-13  Martin Sebor  <msebor@redhat.com>
 
        PR tree-optimization/89662
index 83055556814476b23981c8bdecaca9c80d42d034..c9f1e31014c7574d9f4718e96cbe1d3d5d7431e5 100644 (file)
@@ -9369,7 +9369,6 @@ size_of_die (dw_die_ref die)
          }
          break;
        case dw_val_class_loc_list:
-       case dw_val_class_view_list:
          if (dwarf_split_debug_info && dwarf_version >= 5)
            {
              gcc_assert (AT_loc_list (a)->num_assigned);
@@ -9378,6 +9377,9 @@ size_of_die (dw_die_ref die)
           else
             size += DWARF_OFFSET_SIZE;
          break;
+       case dw_val_class_view_list:
+         size += DWARF_OFFSET_SIZE;
+         break;
        case dw_val_class_range_list:
          if (value_format (a) == DW_FORM_rnglistx)
            {
@@ -9751,12 +9753,12 @@ value_format (dw_attr_node *a)
          gcc_unreachable ();
        }
     case dw_val_class_loc_list:
-    case dw_val_class_view_list:
       if (dwarf_split_debug_info
          && dwarf_version >= 5
          && AT_loc_list (a)->num_assigned)
        return DW_FORM_loclistx;
       /* FALLTHRU */
+    case dw_val_class_view_list:
     case dw_val_class_range_list:
       /* For range lists in DWARF 5, use DW_FORM_rnglistx from .debug_info.dwo
         but in .debug_info use DW_FORM_sec_offset, which is shorter if we