On Tue, 12 Nov 2019 21:08:48 +0000 Richard Sandiford <richard.sandif...@arm.com> wrote:
> Jozef Lawrynowicz <joze...@mittosystems.com> writes: > > diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp > > index 1df645e283c..1ce449cb935 100644 > > --- a/gcc/testsuite/lib/gcc-dg.exp > > +++ b/gcc/testsuite/lib/gcc-dg.exp > > @@ -417,6 +417,16 @@ proc gcc-dg-prune { system text } { > > return "::unsupported::large return values" > > } > > > > + # If exceptions are disabled, mark tests expecting exceptions to be > > enabled > > + # as unsupported. > > + if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] > > { > > + return "::unsupported::exception handling disabled" > > + } > > This is probably safe, but... > > > + > > + if [regexp "(^|\n)\[^\n\]*: error: #error .__cpp_exceptions." $text] { > > + return "::unsupported::exception handling disabled" > > + } > > ...it looks like this would disable g++.dg/cpp1y/feat-neg.C for all > targets. I assume this was motivated by g++.dg/cpp2a/feat-cxx2a.C, > but the kind of effective-target tests you had in the original patch > are probably better there. It might then be more robust to test that > [check_effective_target_...] for the "exception handling disabled" case > above as well, so that other targets aren't affected accidentally. > > It'd be good to test a target/multilib that has exceptions enabled by > default to make sure there's no change in the number of unsupported > tests (rather than just no new fails). Apologies for the delayed response. The messages caught in gcc-dg-prune will only be pruned if they haven't already been caught by dg-warning/error/etc. So basically only if the regex being tested would trigger an "excess errors" failure. As a result, there was no change in passes/fails/unsupported on x86_64-pc-linux-gnu. Checking if exceptions are actually disabled before enabling those prunes is a nice suggestion though, I'll add it to the revised patch. Thanks, Jozef > > Thanks, > Richard