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

Aldy Hernandez aldyh@redhat.com
Fri Dec 9 19:46:00 GMT 2011


On 12/09/11 13:19, Jakub Jelinek wrote:
> On Fri, Dec 09, 2011 at 08:17:04PM +0100, Dominique Dhumieres wrote:
>>> +/* { dg-final { scan-assembler "movl.*, (_?var|\\(%)" } } */
>>
>> It works for me too.
>
> Except that when matching just , (% it doesn't test almost anything.
> IMNSHO you should instead just test it { target !fpic } or similar.
> The _? in there is useful though.
>
> 	Jakub

I assume you mean it tests almost anything, in which case I thought the 
source tiny enough to not elicit any more loads that could be matched. 
But the test is annoyingly system dependent.

How about the patch below?

I used nonpic instead of "!fpic", as check_effective_target_fpic tests 
whether -fpic/-fPIC is supported in the driver, which will obviously 
return true even if we're not generating PIC code.  OTOH 
check_effective_target_nonpic tests whether we are generating PIC code 
by checking "#if __PIC__" which I believe is what we want.

Does this work for everyone?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: curr
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111209/9e7b27bd/attachment.ksh>


More information about the Gcc-patches mailing list