re PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Mar 2017 22:51:23 +0000 (23:51 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Mar 2017 22:51:23 +0000 (23:51 +0100)
PR c++/79821
* dwarf2out.h (dw_vec_const): Change array type from unsigned char *
to void * for PCH reasons.
* dwarf2out.c (output_loc_operands, output_die): Cast
v.val_vec.array to unsigned char *.

From-SVN: r245932

gcc/ChangeLog
gcc/dwarf2out.c
gcc/dwarf2out.h

index bd424cb..feedbaf 100644 (file)
@@ -1,3 +1,11 @@
+2017-03-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/79821
+       * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
+       to void * for PCH reasons.
+       * dwarf2out.c (output_loc_operands, output_die): Cast
+       v.val_vec.array to unsigned char *.
+
 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
 
        PR target 77850
index 87060a3..0bbb90e 100644 (file)
@@ -2020,7 +2020,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
                elt_size /= 2;
                len *= 2;
              }
-           for (i = 0, p = val2->v.val_vec.array;
+           for (i = 0, p = (unsigned char *) val2->v.val_vec.array;
                 i < len;
                 i++, p += elt_size)
              dw2_asm_output_data (elt_size, extract_int (p, elt_size),
@@ -2273,7 +2273,7 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip)
                  elt_size /= 2;
                  len *= 2;
                }
-             for (i = 0, p = val2->v.val_vec.array;
+             for (i = 0, p = (unsigned char *) val2->v.val_vec.array;
                   i < len;
                   i++, p += elt_size)
                dw2_asm_output_data (elt_size, extract_int (p, elt_size),
@@ -10105,7 +10105,7 @@ output_die (dw_die_ref die)
                elt_size /= 2;
                len *= 2;
              }
-           for (i = 0, p = a->dw_attr_val.v.val_vec.array;
+           for (i = 0, p = (unsigned char *) a->dw_attr_val.v.val_vec.array;
                 i < len;
                 i++, p += elt_size)
              dw2_asm_output_data (elt_size, extract_int (p, elt_size),
index 79dc439..9402473 100644 (file)
@@ -163,7 +163,7 @@ enum dw_val_class
 /* Describe a floating point constant value, or a vector constant value.  */
 
 struct GTY(()) dw_vec_const {
-  unsigned char * GTY((atomic)) array;
+  void * GTY((atomic)) array;
   unsigned length;
   unsigned elt_size;
 };