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]

RFC: logical expression in test directive target lists


I'm once again frustrated by the lack of logical operators in target
and xfail selectors in dg- test directives as I try to mark tests
unsupported or expected failures for very specific combinations of
targets and effective targets.  I'd like to add support for logical
operators in a way that fits in with the style of the test directives
and is acceptable to people who'd like to run the testsuite with tools
other than DejaGnu.  I'd appreciate feedback before I tackle
implementing any of this in TCL.

All proposals include:

  selector:
    effective-target-keyword
    tt-list
    selector-expression

  tt-list:
    target-triplet
    target-triplet tt-list

  tt-or-k:
    target-triplet
    effective-target-keyword

Currently a selector is either a list of target triplets or an
effective-target keyword; none of these would not affect existing usage.

Examples are based on combinations needed in real tests.

Proposal 1:

  selector-expression:
    tt-or-k
    { not selector-expression }
    { and selector-expression selector-expression }
    { or selector-expression selector-expression }

  examples:
    { target { and powerpc*-*-* lp64 } }
    { target { not { or hppa*-*-* ia64-*-* } } }
    { xfail { or lp64 vect_no_align } }

Proposal 2:

  selector-expression:
    tt-or-k
    { ! selector-expression }
    { selector-expression && selector-expression }
    { selector-expression || selector-expression }

  examples:
    { target { powerpc*-*-* && lp64 } }
    { target { ! { hppa*-*-* || ia64-*-* } } }
    { xfail { lp64 || vect_no_align } }

Proposal 3:

  selector-expression:
    tt-or-k
    not ( selector-exression )
    and ( selector-exression selector-expression )
    or ( selector-exression selector-expression )

  examples:
    { target and ( powerpc*-*-* lp64 ) }
    { target not ( or ( hppa*-*-* ia64-*-* ) ) }
    { xfail or ( lp64 vect_no_align ) }

Other suggestions are welcome.

Janis


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