This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about the dg-do directive


On 10/16/2012 07:14 AM, Andreas Schwab wrote:
> dominiq@lps.ens.fr (Dominique Dhumieres) writes:
> 
>> These questions are motivated by the comments #4 to #15 of pr54407.
>>
>> The bottom line is that
>>
>> { dg-do compile targets1 }
>> { dg-do run targets2 }
>>
>> behaves as
>>
>> {dg-do run { targets1 targets2 } }
>>
>> while
>>
>> { dg-do run targets1 }
>> { dg-do compile targets2 }
>>
>> as
>>
>> { dg-do compile { targets1 targets2 } }
>>
>> (1) Is the above correct?
>> (2) If yes, is it a (undocumented) feature or a bug?

That's just the way it works, so I suppose you could call it a feature.
DejaGnu doesn't support having different dg-do-what values for different
targets within a test, although it can be done from outside the test in
the .exp file.  Tests that try to do that are broken.

> From dg.exp:
> 
> # Multiple instances are supported (since we don't support target and xfail
> # selectors on one line), though it doesn't make much sense to change the
> # compile/assemble/link/run field.  Nor does it make any sense to have
> # multiple lines of target selectors (use one line).
> 
> Andreas.

I wouldn't rely on that feature, either.  We have much better ways in
local test directives to skip and xfail tests for different targets.

Janis 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]