2015-11-30 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2015 08:24:06 +0000 (08:24 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2015 08:24:06 +0000 (08:24 +0000)
PR c/68162
* dwarf2out.c (gen_type_die_with_usage): Keep variant types
of arrays.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231058 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c

index 3b93648..cbd3000 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-30  Richard Biener  <rguenther@suse.de>
+
+       PR c/68162
+       * dwarf2out.c (gen_type_die_with_usage): Keep variant types
+       of arrays.
+
 2015-11-30  Venkataramanan Kumar  <Venkataramanan.Kumar@amd.com>
 
        * tree-if-conv.c (struct ifc_dr): Add new tree
index add2204..357f114 100644 (file)
@@ -20798,9 +20798,10 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
   /* We are going to output a DIE to represent the unqualified version
      of this type (i.e. without any const or volatile qualifiers) so
      get the main variant (i.e. the unqualified version) of this type
-     now.  (Vectors are special because the debugging info is in the
+     now.  (Vectors and arrays are special because the debugging info is in the
      cloned type itself).  */
-  if (TREE_CODE (type) != VECTOR_TYPE)
+  if (TREE_CODE (type) != VECTOR_TYPE
+      && TREE_CODE (type) != ARRAY_TYPE)
     type = type_main_variant (type);
 
   /* If this is an array type with hidden descriptor, handle it first.  */