summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-08 22:36:41 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-08 22:36:41 +0000
commit7bb8b5ca1874f79103dd9c8943b7387d8c4cd0a1 (patch)
tree377e0c6829a8666e75d21f5fd797c1bad3738b9f /gcc
parent475a53093ece891ea01afe994707164c509e8d7c (diff)
downloadgcc-7bb8b5ca1874f79103dd9c8943b7387d8c4cd0a1.tar.gz
Use -fno-merge-debug-string for some dwarf tests
Use -fno-merge-debug-string to comply with Darwin * g++.dg/debug/dwarf2/namespace-1.C: Use -fno-merge-debug-string and adjust. * g++.dg/debug/dwarf2/template-func-params-6.C: Likewise. * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise. * g++.dg/debug/dwarf2/template-params-6.C: Likewise. * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. Also, adjust to take darwin specifics in account. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151538 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C15
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C16
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C4
6 files changed, 37 insertions, 17 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 19ab633d01d..229c800ea74 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-08 Dodji Seketeli <dodji@redhat.com>
+
+ Fix some test breakages on Darwin
+ * g++.dg/debug/dwarf2/namespace-1.C: Use -fno-merge-debug-string
+ and adjust.
+ * g++.dg/debug/dwarf2/template-func-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
+ * g++.dg/debug/dwarf2/template-params-6.C: Likewise.
+ * g++.dg/debug/dwarf2/pubnames-1.C: Likewise. Also, adjust to
+ take darwin specifics in account.
+
2009-09-08 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/profile-dir-1.c, gcc.dg/profile-dir-2.c,
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
index 59b608fc7ec..d3f26f11222 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
@@ -1,12 +1,12 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/41170
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
//
// We want to test that there is a DW_TAG_namespace DIE DW_AT_name is set
// to "not_emitted". That namespace die has a child DW_TAG_typedef DIE
// which DW_AT_name is the null terminated string "T".
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_namespace" 1 } }
-// { dg-final { scan-assembler-times "DW_AT_name: \"not_emitted\"" 1 } }
+// { dg-final { scan-assembler-times "\"not_emitted.0\".*?DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "DIE +\\(.*?\\) DW_TAG_typedef" 1 } }
// { dg-final { scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
index b2f67036e24..543439da323 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
@@ -1,9 +1,18 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/39706
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-do compile }
-// { dg-final { scan-assembler-times ".debug_pubnames" 1 } }
-// { dg-final { scan-assembler-times "\"main\".*external name" 1 } }
+//
+// There should be one debug_pubnames section generated.
+// On Darwin though, there is also a label pointing at the begining of the
+// debug_pubnames section. The assembly code of that label adds an occurence
+// of section declaration assembly. So on Darwin, we need to check for two
+// occurences of the debug_pubnames section declaration.
+// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 1 { target { ! *-*-darwin* } } } }
+// { dg-final { scan-assembler-times "\.section\[\t \].*?debug_pubnames" 2 { target { *-*-darwin* } } } }
+//
+// Then check of the presence of the names we are interested in.
+// { dg-final { scan-assembler-times "\"main.0\".*external name" 1 } }
// { dg-final { scan-assembler-times "\"ns::ns_x.*external name" 1 } }
// { dg-final { scan-assembler-times "\"y::y_x.*external name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
index 155add48ef4..99bbba3da8d 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
@@ -1,8 +1,8 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
-// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
template <class T>
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
index 07aece6917f..dc6ac990313 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
@@ -1,6 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA -std=c++0x" }
+// { dg-options "-g -dA -std=c++0x -fno-merge-debug-strings" }
// { dg-do compile }
// There must be 5 subprograms generated:
@@ -10,10 +10,10 @@
// That makes 6 template type parameters.
// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 6 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int, char, int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<char, int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf<int>\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"printf\"" 1 } }
+// { dg-final {scan-assembler-times "\"printf<int, char, int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf<char, int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf<int>.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"printf.0\".*?DW_AT_name" 1 } }
// printf<int, char, int> and printf<char, int> have a pack expansion as
// function parameters. In the former, the elements of the parameter pack
@@ -21,9 +21,9 @@
// args#1. In the later, the element of the parameter pack expansion
// is PackTypes#0 and the argument is args#0.
// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#0\"" 2 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"args#0\"" 2 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"PackTypes#1\"" 1 } }
-// { dg-final {scan-assembler-times "DW_AT_name: \"args#1\"" 1 } }
+// { dg-final {scan-assembler-times "\"args#0.0\".*?DW_AT_name" 2 } }
+// { dg-final {scan-assembler-times "\"PackTypes#1.0\".*?DW_AT_name" 1 } }
+// { dg-final {scan-assembler-times "\"args#1.0\".*?DW_AT_name" 1 } }
// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
index dc401fa06e7..184a90f98aa 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C
@@ -1,8 +1,8 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// { dg-final { scan-assembler-times "DW_TAG_GNU_template_template_param" 2 } }
-// { dg-final { scan-assembler-times "DW_AT_GNU_template_name: \"vector\"" 1 } }
+// { dg-final { scan-assembler-times "\"vector.0\".*?DW_AT_GNU_template_name" 1 } }
// { dg-final { scan-assembler-times ".ascii \"U.0\".*?DW_AT_name" 1 } }
template <class T>