On 4/19/2021 1:28 PM, Richard Sandiford via Gcc-patches wrote:
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. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? If so, OK now, or should it wait for GCC 12? Richard 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.
OK for the trunk. jeff