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  <howa...@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* } } } }
 
 template <class T> void f(T t) { }
 

Reply via email to