From: Kito Cheng Date: Mon, 20 Jul 2020 06:41:04 +0000 (+0800) Subject: testsuite: Add signal checking for signal related testcase in analyzer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c850a642e1dfd3a15335d86976015c4a5064b5df;p=gcc.git testsuite: Add signal checking for signal related testcase in analyzer. - Verifed on RISC-V and x86. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/signal-1.c: Add dg-require-effective-target signal. * gcc.dg/analyzer/signal-2.c: Ditto. * gcc.dg/analyzer/signal-3.c: Ditto. * gcc.dg/analyzer/signal-4a.c: Ditto. * gcc.dg/analyzer/signal-4b.c: Ditto. * gcc.dg/analyzer/signal-5.c: Ditto. * gcc.dg/analyzer/signal-6.c: Ditto. * gcc.dg/analyzer/signal-exit.c: Ditto. --- diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-1.c b/gcc/testsuite/gcc.dg/analyzer/signal-1.c index 4dcbcc0fc6b..43f911ba648 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-1.c @@ -1,6 +1,7 @@ /* Example of a bad call within a signal handler. 'handler' calls 'custom_logger' which calls 'fprintf', and 'fprintf' is not allowed from a signal handler. */ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-2.c b/gcc/testsuite/gcc.dg/analyzer/signal-2.c index a56acb060ec..d047c677c41 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-2.c @@ -1,6 +1,7 @@ /* Example of a bad call within a signal handler. 'handler' calls 'custom_logger' which calls 'fprintf', and 'fprintf' is not allowed from a signal handler. */ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-3.c b/gcc/testsuite/gcc.dg/analyzer/signal-3.c index 5b308888777..f5072b52f08 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-3.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target signal } */ #include #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-4a.c b/gcc/testsuite/gcc.dg/analyzer/signal-4a.c index 4b68b6d045b..4ee6f0e7d0e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-4a.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-4a.c @@ -2,6 +2,7 @@ /* { dg-options "-fanalyzer -fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-4b.c b/gcc/testsuite/gcc.dg/analyzer/signal-4b.c index 38d40247357..cb1e7e475ae 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-4b.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-4b.c @@ -2,6 +2,7 @@ /* { dg-options "-fanalyzer -fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */ /* { dg-enable-nn-line-numbers "" } */ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-5.c b/gcc/testsuite/gcc.dg/analyzer/signal-5.c index 4e464fffda5..81ac812ebbd 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-5.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-5.c @@ -1,4 +1,5 @@ /* Example of other bad calls within a signal handler. */ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-6.c b/gcc/testsuite/gcc.dg/analyzer/signal-6.c index f51845167f5..ea2290c4296 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-6.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-6.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target signal } */ #include #include diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-exit.c b/gcc/testsuite/gcc.dg/analyzer/signal-exit.c index a567124c7d4..41a819b838c 100644 --- a/gcc/testsuite/gcc.dg/analyzer/signal-exit.c +++ b/gcc/testsuite/gcc.dg/analyzer/signal-exit.c @@ -1,6 +1,7 @@ /* Example of a bad call within a signal handler with replacement alternative. 'handler' calls 'exit', and 'exit' is not allowed from a signal handler. But '_exit' is allowed. */ +/* { dg-require-effective-target signal } */ #include #include