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.
This commit is contained in:
parent
2ef4cf87a7
commit
c850a642e1
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* { dg-require-effective-target signal } */
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Example of other bad calls within a signal handler. */
|
||||
/* { dg-require-effective-target signal } */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* { dg-require-effective-target signal } */
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue