testsuite: Add signal checking for signal related testcase in analyzer.
authorKito Cheng <kito.cheng@sifive.com>
Mon, 20 Jul 2020 06:41:04 +0000 (14:41 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 21 Jul 2020 06:28:16 +0000 (14:28 +0800)
 - 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.

gcc/testsuite/gcc.dg/analyzer/signal-1.c
gcc/testsuite/gcc.dg/analyzer/signal-2.c
gcc/testsuite/gcc.dg/analyzer/signal-3.c
gcc/testsuite/gcc.dg/analyzer/signal-4a.c
gcc/testsuite/gcc.dg/analyzer/signal-4b.c
gcc/testsuite/gcc.dg/analyzer/signal-5.c
gcc/testsuite/gcc.dg/analyzer/signal-6.c
gcc/testsuite/gcc.dg/analyzer/signal-exit.c

index 4dcbcc0fc6bd21f47a7cc9ec90f0b6055f7e7528..43f911ba648b3028f6ae6a84441678c3476cd594 100644 (file)
@@ -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 <stdio.h>
 #include <signal.h>
index a56acb060ec816a4151a302f5176059fa4ae79db..d047c677c419e54258e3c8cd14ab059ada77788f 100644 (file)
@@ -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 <stdio.h>
 #include <signal.h>
index 5b308888777149acd20d5cde7c6647234aab3c91..f5072b52f08b051fb9bf5042f9da327c694a60d0 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target signal } */
 #include <stdio.h>
 #include <signal.h>
 #include <stdlib.h>
index 4b68b6d045b9080b56b5478a4a5863b608b23cf9..4ee6f0e7d0e0204acd5c12a40fb6837ffcc46a70 100644 (file)
@@ -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 <stdio.h>
 #include <signal.h>
index 38d40247357473d5fe05942ec9b774cc7626622c..cb1e7e475ae37d97c847dba026fad299c357d980 100644 (file)
@@ -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 <stdio.h>
 #include <signal.h>
index 4e464fffda54864e5ad2fa005d9265aeea8a16b6..81ac812ebbd35f692b24417b22f33c72a15f114c 100644 (file)
@@ -1,4 +1,5 @@
 /* Example of other bad calls within a signal handler.  */
+/* { dg-require-effective-target signal } */
 
 #include <stdlib.h>
 #include <signal.h>
index f51845167f5c00ae40907357bb51800b210870b3..ea2290c4296a011edd823feb76733bbb4f943c7b 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target signal } */
 #include <stdio.h>
 #include <signal.h>
 
index a567124c7d4d31a5eded66f7f93af208a2e65887..41a819b838c88bc4432462782c4c2d62b4def77e 100644 (file)
@@ -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 <signal.h>
 #include <stdlib.h>