aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2019-01-03 12:05:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-01-03 12:05:24 +0100
commitc04d40dae8a490e28d4f07c46e57719fb0a4eaf6 (patch)
treefb1fc31d3445b2773c646f450812c1f9d995ef8f
parent8ae4d4298d9460344c47687899d927ff3264a343 (diff)
downloadgcc-c04d40dae8a490e28d4f07c46e57719fb0a4eaf6.zip
gcc-c04d40dae8a490e28d4f07c46e57719fb0a4eaf6.tar.gz
gcc-c04d40dae8a490e28d4f07c46e57719fb0a4eaf6.tar.bz2
re PR debug/88644 (Unexpected pub type info eliminated after r246973 (causes pubtypes-*.c to regress).)
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c2
-rw-r--r--gcc/testsuite/ChangeLog12
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr88644.c7
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-4.c2
8 files changed, 30 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d1b1876..4eec4b5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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 ...
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 94e36b1..8d9a384 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 413bb09..768c109 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,17 @@
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
* g++.target/i386/pr88636.C: New test.
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c
index f1a6a33..57633b4 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr80263.c
@@ -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
index 0000000..1b16627
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr88644.c
@@ -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} } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-2.c b/gcc/testsuite/gcc.dg/pubtypes-2.c
index 3ac3a38..6669f3d 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-2.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-2.c
@@ -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" } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-3.c b/gcc/testsuite/gcc.dg/pubtypes-3.c
index 6fa1940..345e4ed 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-3.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-3.c
@@ -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" } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-4.c b/gcc/testsuite/gcc.dg/pubtypes-4.c
index b2f520d..da2f9b0 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-4.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-4.c
@@ -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" } } */