diff mbox

Fix g++.dg/debug/dwarf2/thunk1.C on darwin

Message ID 20130305221945.GA3023@bromo.med.uc.edu
State New
Headers show

Commit Message

Jack Howarth March 5, 2013, 10:19 p.m. UTC
Darwin does PIC differently than ELF so that the scan-assembler-times
fails for g++.dg/debug/dwarf2/thunk1.C. The attached patch skips the
scan-assembler for *-*-darwin*. Tested on x86_64-apple-darwin12. Okay
for gcc trunk.
                  Jack
gcc/testsuite/

2013-03-05  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR debug/53363
	* g++.dg/debug/dwarf2/thunk1.C: Skip final scan on darwin.

Comments

Rainer Orth March 6, 2013, 11:33 a.m. UTC | #1
Jack Howarth <howarth@bromo.med.uc.edu> writes:

> 2013-03-05  Jack Howarth  <howarth@bromo.med.uc.edu>
>
> 	PR debug/53363
> 	* g++.dg/debug/dwarf2/thunk1.C: Skip final scan on darwin.
>
> Index: gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C
> ===================================================================
> --- gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C	(revision 196462)
> +++ gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C	(working copy)
> @@ -1,7 +1,7 @@
>  // Test that we don't add the x86 PC thunk to .debug_ranges
>  // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
>  // { dg-options "-g -fpic -fno-dwarf2-cfi-asm" }
> -// { dg-final { scan-assembler-times "LFB3" 5 } }
> +// { dg-final { scan-assembler-times "LFB3" 5 { target { ! *-*-darwin* } } } }

Why not skip the whole test with dg-skip-if, since the scan is the whole
point of the testcase AFAICT?  Also, please add a comment explaining why
the test is skipped, perhaps referencing the PR.

	Rainer
diff mbox

Patch

Index: gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C
===================================================================
--- gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C	(revision 196462)
+++ gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C	(working copy)
@@ -1,7 +1,7 @@ 
 // Test that we don't add the x86 PC thunk to .debug_ranges
 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
 // { dg-options "-g -fpic -fno-dwarf2-cfi-asm" }
-// { dg-final { scan-assembler-times "LFB3" 5 } }
+// { dg-final { scan-assembler-times "LFB3" 5 { target { ! *-*-darwin* } } } }
 
 template <class T> void f(T t) { }