This is the mail archive of the 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: Testsuite patch for Solaris 10

On Sat, Nov 13, 2004 at 12:19:22AM +0000, Joseph S. Myers wrote:
> What in this framework would the equivalents be of (a) the plain { 
> dg-forbid-option "-m64" } on a test that only runs for { target i?86-*-* 
> }, (b) { dg-forbid-option "-m64" { target i?86-*-* } } for a test that 
> runs on other targets (maybe all targets, maybe only x86 and x86-64) but 
> has special options for x86 meaning that -m64 shouldn't be used?  (Or, 
> alternatively, how would the special options be enabled only for x86 
> without -m64, with x86 with -m64 getting the default options, which might 
> be the better thing to do for such tests e.g. gcc.dg/20030926-1.c?)

These assume a new proc "is-option" as described in my first reply to
your patch.

Any one of the following would run the test only on an i?86 target when
-m64 isn't one of the command-line options.  Line breaks are added for

  { dg-do run { target i?86-*-* } }
  { dg-require [dg-not [is-option "-m64"]] }


  { dg-do run [dg-target-list target
                              [dg-and [istarget i?86-*-*]
                                      [dg-not [is-option "-m64"]]]] }


  { dg-require [dg-and [istarget i?86-*-*]
                       [dg-not [is-option "-m64"]]] }

For a test that is run for a set of multiple targets but should be
skipped for i?86 when -m64 isn't a command-line option:

  { dg-do run { target xxx yyy zzz } }
  { dg-require [dg-not [dg-and [istarget i?86-*-*] [is-option "-m64"]]] }

I'm not sure about your third question; is this it?  The following
would add options when we're not on i?86 with -m64:

  { dg-options "options ..."
     [dg-target-list target [dg-not [dg-and [istarget i?86]
                                            [is-option "-m64"]]]] }

Yes, this is hard to follow, but ultimately it's more clear than using
a greater number of dg- commands to skip or xfail tests.


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