]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add dg-final option-based target selectors
authorRichard Sandiford <richard.sandiford@arm.com>
Sat, 24 Apr 2021 08:35:16 +0000 (09:35 +0100)
committerFrederik Harwath <frederik@codesourcery.com>
Tue, 16 Nov 2021 15:36:31 +0000 (16:36 +0100)
commit00b98b6cac250b32015757162510aaa4ab23bfae
tree8bc55da1581b4385fff8e616f3c5412739f99f46
parentfa558c2a66648ca20d569921ba4a8ffb2ea0361b
Add dg-final option-based target selectors

This patch adds target selectors of the form:

  { any-opts "opt1" ... "optn" }
  { no-opts "opt1" ... "optn" }

for skipping or xfailing tests based on compiler options.  It only
works for dg-final selectors.

The patch then uses no-opts to exclude -O0 and (sometimes) -Og from
some guality.exp xfails.  AFAICT (based on gcc-testresults) these
tests pass for those options for all targets.

gcc/
* doc/sourcebuild.texi: Document no-opts and any-opts target
selectors.

gcc/testsuite/
* lib/target-supports-dg.exp (selector_expression): Handle any-opts
and no-opts.
* gcc.dg/guality/pr41353-1.c: Exclude -O0 from xfail.
* gcc.dg/guality/pr59776.c: Likewise.
* gcc.dg/guality/pr54970.c: Likewise -O0 and -Og.
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.dg/guality/pr41353-1.c
gcc/testsuite/gcc.dg/guality/pr54970.c
gcc/testsuite/gcc.dg/guality/pr59776.c
gcc/testsuite/lib/target-supports-dg.exp