Patchwork [testsuite/darwin] adjust new gcov tests for darwin.

login
register
mail settings
Submitter IainS
Date Nov. 21, 2011, 10:30 a.m.
Message ID <FC7F8555-F4AF-45B9-9BF6-E2C267A6CD22@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/126730/
State New
Headers show

Comments

IainS - Nov. 21, 2011, 10:30 a.m.
Darwin uses ".private_extern" for hidden visibility, and also we have  
__USER_LABEL_PREFIX__ set to "_".

OK for trunk?
Iain

gcc/testsuite:

	* gcc.misc-tests/gcov-16.c: Adjust scan-assembler for Darwin.
	* gcc.misc-tests/gcov-17.c: Likewise.
	* g++.dg/gcov/gcov-8.C: Likewise.
	* g++.dg/gcov/gcov-9.C: Likewise.
Nathan Sidwell - Nov. 21, 2011, 12:52 p.m.
On 11/21/11 10:30, Iain Sandoe wrote:
> Darwin uses ".private_extern" for hidden visibility, and also we have
> __USER_LABEL_PREFIX__ set to "_".
>
> OK for trunk?
> Iain
>
> gcc/testsuite:
>
> * gcc.misc-tests/gcov-16.c: Adjust scan-assembler for Darwin.
> * gcc.misc-tests/gcov-17.c: Likewise.
> * g++.dg/gcov/gcov-8.C: Likewise.
> * g++.dg/gcov/gcov-9.C: Likewise.

ok gcov-wise, thanks.

nathan
Mike Stump - Nov. 21, 2011, 9:24 p.m.
On Nov 21, 2011, at 2:30 AM, Iain Sandoe <developer@sandoe-acoustics.co.uk> wrote:
> Darwin uses ".private_extern" for hidden visibility, and also we have __USER_LABEL_PREFIX__ set to "_".
> 
> OK for trunk?

Ok.

Patch

Index: gcc/testsuite/gcc.misc-tests/gcov-16.c
===================================================================
--- gcc/testsuite/gcc.misc-tests/gcov-16.c	(revision 181539)
+++ gcc/testsuite/gcc.misc-tests/gcov-16.c	(working copy)
@@ -8,4 +8,5 @@  void Foo ()
 {
 }
 
- /* { dg-final { scan-assembler "\\.hidden\t__gcov__Foo" } } */
+ /* { dg-final { scan-assembler "\\.hidden\t__gcov__Foo" { target { ! *-*-darwin*  } } } } */
+ /* { dg-final { scan-assembler "\\.private_extern ___gcov__Foo" { target *-*-darwin* } } } */
Index: gcc/testsuite/gcc.misc-tests/gcov-17.c
===================================================================
--- gcc/testsuite/gcc.misc-tests/gcov-17.c	(revision 181539)
+++ gcc/testsuite/gcc.misc-tests/gcov-17.c	(working copy)
@@ -8,4 +8,5 @@  void __attribute__ ((visibility ("hidden"), weak))
 {
 }
 
-/* { dg-final { scan-assembler "\\.hidden\t__gcov__Foo" } } */
+/* { dg-final { scan-assembler "\\.hidden\t__gcov__Foo" { target { ! *-*-darwin*  } } } } */
+/* { dg-final { scan-assembler "\\.private_extern ___gcov__Foo" { target *-*-darwin* } } } */
Index: gcc/testsuite/g++.dg/gcov/gcov-8.C
===================================================================
--- gcc/testsuite/g++.dg/gcov/gcov-8.C	(revision 181539)
+++ gcc/testsuite/g++.dg/gcov/gcov-8.C	(working copy)
@@ -10,4 +10,5 @@  void X::Fink ()
 {
 }
 
-/* { dg-final { scan-assembler "\\.hidden\t__gcov___ZN1X4FinkEv" } } */
+/* { dg-final { scan-assembler "\\.hidden\t__gcov___ZN1X4FinkEv" { target { ! *-*-darwin*  } } } } */
+/* { dg-final { scan-assembler "\\.private_extern ___gcov___ZN1X4FinkEv" { target *-*-darwin* } } } */
Index: gcc/testsuite/g++.dg/gcov/gcov-9.C
===================================================================
--- gcc/testsuite/g++.dg/gcov/gcov-9.C	(revision 181539)
+++ gcc/testsuite/g++.dg/gcov/gcov-9.C	(working copy)
@@ -10,6 +10,8 @@  extern "C" void (*Foo ()) ()
   return Boo;
 }
 
-/* { dg-final { scan-assembler "\\.hidden\t__gcov___Z3Boov" } } */
+/* { dg-final { scan-assembler "\\.hidden\t__gcov___Z3Boov" { target { ! *-*-darwin*  } } } } */
+/* { dg-final { scan-assembler "\\.private_extern ___gcov___Z3Boov" { target *-*-darwin* } } } */
 /* { dg-final { scan-assembler "__gcov__Foo:" } } */
-/* { dg-final { scan-assembler-not "\\.hidden\t__gcov__Foo" } } */
+/* { dg-final { scan-assembler-not "\\.hidden\t__gcov__Foo" { target { ! *-*-darwin*  } } } } */
+/* { dg-final { scan-assembler-not "\\.private_extern ___gcov__Foo" { target *-*-darwin* } } } */