From: Sandra Loosemore Date: Wed, 25 Mar 2020 00:55:07 +0000 (-0700) Subject: Test for sigsetjmp support in analyzer tests requiring that feature. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=adaf4b6c66e789d927684003b9ee05ed04c105ea;p=gcc.git Test for sigsetjmp support in analyzer tests requiring that feature. 2020-03-24 Sandra Loosemore gcc/testsuite/ * gcc.dg/analyzer/sigsetjmp-5.c: Require sigsetjmp support. * gcc.dg/analyzer/sigsetjmp-6.c: Likewise. * lib/target-supports.exp (check_effective_target_sigsetjmp): New. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd2e45dcb2d..56a630412ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-03-24 Sandra Loosemore + + * gcc.dg/analyzer/sigsetjmp-5.c: Require sigsetjmp support. + * gcc.dg/analyzer/sigsetjmp-6.c: Likewise. + * lib/target-supports.exp (check_effective_target_sigsetjmp): New. + 2020-03-24 Marek Polacek PR c++/94190 - wrong no post-decrement operator error in template. diff --git a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c index 68afe9d1c97..2bc73e80f2d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c +++ b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target sigsetjmp } */ + #include #include #include "analyzer-decls.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c index fcd9d0bbb47..d45804b951a 100644 --- a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c +++ b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target sigsetjmp } */ + #include #include #include diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f9794b6688f..10353af580a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -9034,6 +9034,12 @@ proc check_effective_target_stpcpy {} { return [check_function_available "stpcpy"] } +# Returns 1 if "sigsetjmp" is available on the target system. + +proc check_effective_target_sigsetjmp {} { + return [check_function_available "sigsetjmp"] +} + # Check whether the vectorizer tests are supported by the target and # append additional target-dependent compile flags to DEFAULT_VECTCFLAGS. # If a port wants to execute the tests more than once it should append