diff mbox

PR/50076 make c-c++-common/cxxbitfields-3.c work in Darwin

Message ID 69E4112B-C062-42EF-86A7-6674888D1582@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Dec. 10, 2011, 10:15 a.m. UTC
On 9 Dec 2011, at 20:56, Iain Sandoe wrote:
>
> [[**  I'm checking out whether it's feasible to switch off PIC for  
> m64 Darwin .. so one could just do the test -fno-PIC ..
>   ... works for m32 - but PIC is jammed on for x86/m64 ... ]]

I guess the problem is that, whilst we *could* arrange to allow PIC to  
be switched off for x86-64 darwin, it is not supported by the system,  
which could open up a different can of worms with Users trying  
something that is bound to fail....

so what about this as a compromise -
- the test that Jakub identifies as not particularly strong is only  
applied to Darwin
- for which it would seem to check the output adequately.

does this work elsewhere?
Iain
diff mbox

Patch

Index: gcc/testsuite/c-c++-common/cxxbitfields-3.c
===================================================================
--- gcc/testsuite/c-c++-common/cxxbitfields-3.c	(revision 182177)
+++ gcc/testsuite/c-c++-common/cxxbitfields-3.c	(working copy)
@@ -18,4 +18,5 @@  void setit()
   var.j = 5;
 }
 
-/* { dg-final { scan-assembler "movl.*, var" } } */
+/* { dg-final { scan-assembler "movl.*, _?var" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler "movl.*, (_?var|\\(%)" { target *-*-darwin* } } } */