From adaf4b6c66e789d927684003b9ee05ed04c105ea Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 24 Mar 2020 17:55:07 -0700 Subject: [PATCH] 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. --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c | 2 ++ gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c | 2 ++ gcc/testsuite/lib/target-supports.exp | 6 ++++++ 4 files changed, 16 insertions(+) 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 -- 2.30.2