[Patch testsuite] Skip gcc.dg/ifcvt-4.c for targets on which it may not work

Mike Stump mikestump@comcast.net
Thu Dec 24 19:40:00 GMT 2015


On Dec 22, 2015, at 3:24 AM, Richard Earnshaw (lists) <Richard.Earnshaw@arm.com> wrote:
> 
>> In theory what I want to be able to do is build all the listed targets
>> and run a single test on them so that we can build these skip/xfail
>> lists much easier.
>> 
>> I've done it a few times by hand and it seems like it's something we
>> ought to be able to do much more easily.

> The bigger problem here is that branch costs are a property of a
> specific CPU, not the target architecture.  So deciding whether or not
> we should skip this test (and perhaps others like it) is impossible
> given that we can't know what the default CPU for the compiler is (and
> even if we did know, maintaining such a list would be almost impossible).

As I see it, I don’t see any prohibition that c2e-gcc --target not list the information you seek.  Nor do I see any prohibition that dejagnu not run the compiler with the that flag, nor that it read it and understand how gcc was configured.  Neither do I see a prohibition that dejagnu not run a target piece of code to dynamically determine on what type of cpu (or/system) the code is running on.  So, any desire not to do this, I think is a decision for the port maintainer alone.  If they want to do this, they can, it they want to not do this, that’s their prerogative.  Further, a port is free to have built-in preprocessor symbols that describe the targeted cpu and/or architecture.

One can even imagine that gcc provides feature test macros that can be used to make tests more portable. 

As for what’s best, that’s for port maintainers and backend maintainers to decide.  :-)


More information about the Gcc-patches mailing list