re PR debug/88644 (Unexpected pub type info eliminated after r246973 (causes pubtypes...
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 Jan 2019 11:05:24 +0000 (12:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 Jan 2019 11:05:24 +0000 (12:05 +0100)
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.
* gcc.dg/debug/dwarf2/pr80263.c: Remove darwin hack.

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: r267550

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c
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 d1b1876354d685464b170796e26ec2a43362b0b5..4eec4b5e9872aa651968d1a8c8757b9592900f84 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2019-01-03  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-utils.c (scale_ipa_profile_for_fn): Break out from ...
index 94e36b137ecb763a512ab978ef856f5a0f8ff4fc..8d9a3849fa4289e246a10a66252667dd4c6e0f75 100644 (file)
@@ -13152,6 +13152,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;
     }
 
   /* If we do, then we can just use its DIE, if it exists.  */
index 413bb098b7c1b5b651ab976065ea9bd7cc0a9e19..768c109ce37f09625ba6e458db39775e2cedda75 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/88644
+       * gcc.dg/debug/dwarf2/pr88644.c: New test.
+       * gcc.dg/debug/dwarf2/pr80263.c: Remove darwin hack.
+
+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.
+
 2019-01-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/88636
index f1a6a33616370932025c42cb9a82c4fefe6044a4..57633b4f0ebe4a4d1d11839f35127d2cd176d4d7 100644 (file)
@@ -1,8 +1,6 @@
 /* PR debug/80263 */
 /* { dg-do compile } */
 /* { dg-options "-g -dA" } */
-/* Darwin emits pubnames/types by default - suppress this for the test. */
-/* { dg-additional-options "-gno-pubnames" { target *-*-darwin* } }  */
 
 char array[1];
 
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 3ac3a3835c827bff4839b2c529a5342cc74c8eb7..6669f3d3170d14afc74d7434e60875fd92253dec 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 6fa1940c6068d681993c5a67ad439d80b4bb9774..345e4edaba678574f533bf8bf2b3507ad5d4a418 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 b2f520d8c828a0482f6b0fe2e642cf57cb0eaecc..da2f9b02ff435bad0aaaf9a1e215fdcd7e469c17 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" } } */