]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR debug/88644 (Unexpected pub type info eliminated after r246973 (cause...
authorJakub Jelinek <jakub@redhat.com>
Fri, 30 Aug 2019 11:24:34 +0000 (13:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 30 Aug 2019 11:24:34 +0000 (13:24 +0200)
Backported from mainline
2019-01-03  Jakub Jelinek  <jakub@redhat.com>

PR debug/88644
* dwarf2out.c (modified_type_die): If type is equal to sizetype,
change it to qualified_type.

* gcc.dg/debug/dwarf2/pr88644.c: New test.

2019-01-03  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/pubtypes-2.c: Adjust expected pubtypes length.
* gcc.dg/pubtypes-3.c: Likewise.
* gcc.dg/pubtypes-4.c: Likewise.

From-SVN: r275083

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/pr88644.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pubtypes-2.c
gcc/testsuite/gcc.dg/pubtypes-3.c
gcc/testsuite/gcc.dg/pubtypes-4.c

index 12bac130d6140fc40d26b4a454373cab9d301ae5..7c3d589b62605c042810d99e5ed61cd430e3aae5 100644 (file)
@@ -1,6 +1,12 @@
 2019-08-30  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2019-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/88644
+       * dwarf2out.c (modified_type_die): If type is equal to sizetype,
+       change it to qualified_type.
+
        2018-12-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/85594
index 5223e3b2fb4395e96cd636d87ac7dabb8cedb450..2069051cd0dcb2519c629aa3a23832d13df58b9c 100644 (file)
@@ -12495,6 +12495,8 @@ modified_type_die (tree type, int cv_quals, bool reverse,
               && TYPE_PRECISION (sizetype) == TYPE_PRECISION (size_type_node)
               && TYPE_UNSIGNED (sizetype) == TYPE_UNSIGNED (size_type_node))
        qualified_type = size_type_node;
+      if (type == sizetype)
+       type = qualified_type;
     }
 
 
index 41349ce895313d1b3def214cf25618528231c4ed..021f53c43f990d147c1424c66e16deed3ac54a49 100644 (file)
@@ -1,6 +1,17 @@
 2019-08-30  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2019-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/88644
+       * gcc.dg/debug/dwarf2/pr88644.c: New test.
+
+       2019-01-03  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * gcc.dg/pubtypes-2.c: Adjust expected pubtypes length.
+       * gcc.dg/pubtypes-3.c: Likewise.
+       * gcc.dg/pubtypes-4.c: Likewise.
+
        2018-12-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/85594
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr88644.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr88644.c
new file mode 100644 (file)
index 0000000..1b16627
--- /dev/null
@@ -0,0 +1,7 @@
+/* PR debug/88644 */
+/* { dg-do compile } */
+/* { dg-options "-gdwarf-4 -dA -gpubnames" } */
+
+char array[1];
+
+/* { dg-final { scan-assembler-not {\msizetype} } } */
index b4ba8712c5ef24291745dd90ce5972a5bcbd658b..6f319ffa03369671e3f99b0550973a9ab882567d 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-O0 -gdwarf-2 -dA" } */
 /* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
 /* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x13b+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x12e+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
 /* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 /* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 
index cd495352a9d035268465ae7ebf4a8694fea73ddd..999276756d433723bac8d3a9392689a6555df0fb 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-O0 -gdwarf-2 -dA" } */
 /* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
 /* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x13b+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x12e+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
 /* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 /* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 /* { dg-final { scan-assembler-not "\"list_name_type\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
index 85e2b5be2af50dc625bca8e892c9fb4f4f1d140b..6941f17d8725d0a4200ff8360c5692d86ca1d4c8 100644 (file)
@@ -2,7 +2,7 @@
 /* { dg-options "-O0 -gdwarf-2 -dA" } */
 /* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
 /* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x172+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x165+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
 /* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 /* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
 /* { dg-final { scan-assembler "\"list_name_type\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */