Use -fno-merge-debug-string for some dwarf tests
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Sep 2009 22:36:41 +0000 (22:36 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 8 Sep 2009 22:36:41 +0000 (22:36 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/namespace-1.C
gcc/testsuite/g++.dg/debug/dwarf2/pubnames-1.C
gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-6.C
gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
gcc/testsuite/g++.dg/debug/dwarf2/template-params-6.C

index 19ab633..229c800 100644 (file)
@@ -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,
index 59b608f..d3f26f1 100644 (file)
@@ -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 } }
 
index b2f6703..543439d 100644 (file)
@@ -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 } }
 
index 155add4..99bbba3 100644 (file)
@@ -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>
index 07aece6..dc6ac99 100644 (file)
@@ -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:
 
 // 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 } }
 
index dc401fa..184a90f 100644 (file)
@@ -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>