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.

From-SVN: r151538
This commit is contained in:
Dodji Seketeli 2009-09-08 22:36:41 +00:00 committed by Dodji Seketeli
parent edf736cb4d
commit c0389e926a
6 changed files with 37 additions and 17 deletions

View 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,

View 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 } }

View 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 } }

View 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>

View 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:
@ -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 } }

View 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>