public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Test for sigsetjmp support in analyzer tests requiring that feature.
@ 2020-03-22 17:31 Sandra Loosemore
  2020-03-22 18:13 ` David Malcolm
  2020-04-02  9:36 ` Thomas Schwinge
  0 siblings, 2 replies; 5+ messages in thread
From: Sandra Loosemore @ 2020-03-22 17:31 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

The new-ish analyzer test cases sigsetjmp-5.c and sigsetjmp-6.c were 
failing on nios2-elf and probably other newlib targets due to lack of 
support for sigsetjmp.  I didn't see a suitable existing 
effective-target test for this, so I added one.

OK to commit?

-Sandra

[-- Attachment #2: sigsetjmp.patch --]
[-- Type: text/x-patch, Size: 2401 bytes --]

commit 86645c71b1ee8ca228a72a0c21ae38c4264da8fb
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Sun Mar 22 10:22:59 2020 -0700

    Test for sigsetjmp support in analyzer tests requiring that feature.
    
    2020-03-22  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.

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 892fcb6..32fc629 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-22  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-22  Iain Buclaw  <ibuclaw@gdcproject.org>
 
 	PR d/93038
diff --git a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c
index 68afe9d..2bc73e8 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 <setjmp.h>
 #include <stddef.h>
 #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 fcd9d0b..d45804b 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 <setjmp.h>
 #include <stddef.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4413c26..6456126 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8984,6 +8984,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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-02 20:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-22 17:31 [PATCH] Test for sigsetjmp support in analyzer tests requiring that feature Sandra Loosemore
2020-03-22 18:13 ` David Malcolm
2020-04-02  9:36 ` Thomas Schwinge
2020-04-02 10:09   ` Tobias Burnus
2020-04-02 20:45     ` Sandra Loosemore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).