Test for sigsetjmp support in analyzer tests requiring that feature.
authorSandra Loosemore <sandra@codesourcery.com>
Wed, 25 Mar 2020 00:55:07 +0000 (17:55 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Wed, 25 Mar 2020 00:55:07 +0000 (17:55 -0700)
2020-03-24  Sandra Loosemore  <sandra@codesourcery.com>

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
gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c
gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c
gcc/testsuite/lib/target-supports.exp

index bd2e45dcb2d8f417d9b95296d3558ac3ca08aa42..56a630412ab266497935a71a75fa258738be6ede 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-24  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * 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  <polacek@redhat.com>
 
        PR c++/94190 - wrong no post-decrement operator error in template.
index 68afe9d1c9761bd833a3e2cc44553335fdf77e27..2bc73e80f2d74b24a85b4bde77c98816bdb2df54 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target sigsetjmp } */
+
 #include <setjmp.h>
 #include <stddef.h>
 #include "analyzer-decls.h"
index fcd9d0bbb47f41720a3cdec4abc4ae6c1a332fc1..d45804b951a5151595c27906c729ce104357d017 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target sigsetjmp } */
+
 #include <setjmp.h>
 #include <stddef.h>
 #include <stdlib.h>
index f9794b6688f5ed284dde196f9709433bd1c2140e..10353af580a875c2bd8303d226ccd1e92bd1bfcb 100644 (file)
@@ -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