- 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.
/* 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>
/* 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>
+/* { dg-require-effective-target signal } */
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
/* { 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>
/* { 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>
/* Example of other bad calls within a signal handler. */
+/* { dg-require-effective-target signal } */
#include <stdlib.h>
#include <signal.h>
+/* { dg-require-effective-target signal } */
#include <stdio.h>
#include <signal.h>
/* 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>