From: Sandra Loosemore <sandra@codesourcery.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Test for sigsetjmp support in analyzer tests requiring that feature.
Date: Sun, 22 Mar 2020 11:31:31 -0600 [thread overview]
Message-ID: <e76d42a1-3f9c-be3c-2779-57a9b4558915@codesourcery.com> (raw)
[-- 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
next reply other threads:[~2020-03-22 17:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-22 17:31 Sandra Loosemore [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e76d42a1-3f9c-be3c-2779-57a9b4558915@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).