This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about the dg-do directive
On 10/16/2012 03:31 PM, Dominique Dhumieres wrote:
> Thanks for the quick answer.
>
>> That's just the way it works, so I suppose you could call it a feature.
>
> So the answer to (1) is yes and to (2) it is a poorly documented feature.
> May be the restriction to one dg-do directive should be added to
> http://gcc.gnu.org/wiki/HowToPrepareATestcase .
And http://gcc.gnu.org/onlinedocs/gccint/Directives.html#Directives .
> In gcc/testsuite/* I have found 27 instances of such double directives
> most of the in the powerpc tests (gcc.target/powerpc/altivec*).
> I can provide a list if it helps.
>
>> ... We have much better ways in
>> local test directives to skip and xfail tests for different targets.
>
> Could you elaborate please? AFAIU skip or xfail do not allow to do
> what was intended in the gcc.target/powerpc/altivec* cases for instance:
> run for powerpc*-*-* && vmx_hw and compile for
> powerpc*-*-* && { ! vmx_hw }.
No, those would need to be done in separate tests, or via a different
.exp file (perhaps in a subdirectory) that sets dg-do-what-default
to "compile" or "run" depending on the target; there are several sets
of tests that already do that.
Janis