From 20a0080acc9c4bf3d8243600b8358bbd0e9cc896 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Sat, 15 Aug 2020 15:42:12 -0400
Subject: [PATCH 25/49] FIXME: eschew system headers in analyzer testsuite

---
 .../analyzer/CVE-2005-1689-dedupe-issue-2.c   |   2 +-
 .../analyzer/CVE-2005-1689-dedupe-issue.c     |   2 +-
 .../gcc.dg/analyzer/CVE-2005-1689-minimal.c   |   2 +-
 .../gcc.dg/analyzer/FOLLOWUPS-pr94714.c       |   2 +-
 .../NOT_FOR_UPSTREAM-clang-paper-example-2.c  |   2 +-
 .../NOT_FOR_UPSTREAM-clang-paper-example-3.c  |   2 +-
 .../NOT_FOR_UPSTREAM-clang-paper-example-4.c  |   2 +-
 .../analyzer/NOT_FOR_UPSTREAM-setjmp-sj1.c    |   6 +-
 .../NOT_FOR_UPSTREAM-setjmp-wikipedia-1.c     |   5 +-
 .../NOT_FOR_UPSTREAM-setjmp-wikipedia-2.c     |   7 +-
 gcc/testsuite/gcc.dg/analyzer/abort.c         |   3 +-
 gcc/testsuite/gcc.dg/analyzer/alloca-leak.c   |   2 +-
 .../gcc.dg/analyzer/analyzer-std-decls.h      | 118 ++++++++++++++++++
 .../gcc.dg/analyzer/analyzer-verbosity-0.c    |   3 +-
 .../gcc.dg/analyzer/analyzer-verbosity-1.c    |   2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-2.c    |   2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-2a.c   |   2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-3.c    |   2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-3a.c   |   2 +-
 .../gcc.dg/analyzer/attribute-nonnull.c       |   2 +-
 .../gcc.dg/analyzer/bzip2-arg-parse-1.c       |   3 +-
 .../gcc.dg/analyzer/call-summaries-1.c        |   2 +-
 .../gcc.dg/analyzer/compound-assignment-1.c   |   2 +-
 .../gcc.dg/analyzer/compound-assignment-2.c   |   2 +-
 .../gcc.dg/analyzer/compound-assignment-3.c   |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-1.c  |   5 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-10.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-13.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-14.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-15.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-2.c  |   3 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-20.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-4.c  |   3 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-5.c  |   4 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-5b.c |   4 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-5c.c |   4 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-5d.c |   4 +-
 gcc/testsuite/gcc.dg/analyzer/data-model-9.c  |   3 +-
 .../gcc.dg/analyzer/data-model-path-1.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/disabling.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/dot-output.c    |   2 +-
 .../gcc.dg/analyzer/double-free-lto-1-a.c     |   2 +-
 .../gcc.dg/analyzer/double-free-lto-1-b.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/edges-1.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/edges-2.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/explode-1.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/explode-2.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/file-1.c        |   2 +-
 gcc/testsuite/gcc.dg/analyzer/file-2.c        |   2 +-
 gcc/testsuite/gcc.dg/analyzer/file-paths-1.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/file-pr58237.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/first-field-2.c |   3 +-
 .../gcc.dg/analyzer/function-ptr-1.c          |   2 +-
 .../gcc.dg/analyzer/function-ptr-2.c          |   2 +-
 .../gcc.dg/analyzer/function-ptr-3.c          |   2 +-
 gcc/testsuite/gcc.dg/analyzer/getchar-1.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/gzio.c          |   2 +-
 gcc/testsuite/gcc.dg/analyzer/leak-2.c        |   2 +-
 .../loop-0-up-to-n-by-1-with-iter-obj.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/loop-3.c        |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-1.c      |   3 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-3.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-4.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-5.c      |   2 +-
 .../gcc.dg/analyzer/malloc-callbacks.c        |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-dce.c    |   2 +-
 .../gcc.dg/analyzer/malloc-dedupe-1.c         |   2 +-
 .../gcc.dg/analyzer/malloc-in-loop.c          |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-1.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-10.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-12.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-3.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-4.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-5.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-6.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-7.c  |   2 +-
 .../analyzer/malloc-ipa-8-double-free.c       |   2 +-
 .../gcc.dg/analyzer/malloc-ipa-8-lto-a.c      |   2 +-
 .../gcc.dg/analyzer/malloc-ipa-8-lto-b.c      |   2 +-
 .../gcc.dg/analyzer/malloc-ipa-8-lto-c.c      |   2 +-
 .../gcc.dg/analyzer/malloc-ipa-8-unchecked.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c  |   2 +-
 .../gcc.dg/analyzer/malloc-many-paths-1.c     |   2 +-
 .../gcc.dg/analyzer/malloc-many-paths-2.c     |   2 +-
 .../gcc.dg/analyzer/malloc-many-paths-3.c     |   2 +-
 .../gcc.dg/analyzer/malloc-paths-1.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-10.c         |   2 +-
 .../gcc.dg/analyzer/malloc-paths-2.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-3.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-4.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-5.c          |   3 +-
 .../gcc.dg/analyzer/malloc-paths-6.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-7.c          |   2 +-
 .../gcc.dg/analyzer/malloc-paths-8.c          |   4 +-
 .../gcc.dg/analyzer/malloc-paths-9.c          |   2 +-
 .../gcc.dg/analyzer/malloc-vs-local-1a.c      |   2 +-
 .../gcc.dg/analyzer/malloc-vs-local-1b.c      |   2 +-
 .../gcc.dg/analyzer/malloc-vs-local-2.c       |   2 +-
 .../gcc.dg/analyzer/malloc-vs-local-3.c       |   2 +-
 .../gcc.dg/analyzer/malloc-vs-local-4.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/memcpy-1.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/memset-1.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/params-2.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/paths-3.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/paths-6.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/paths-7.c       |   2 +-
 .../gcc.dg/analyzer/pattern-test-1.c          |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr93290.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94399.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94458.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94639.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94640.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94851-1.c     |   3 +-
 gcc/testsuite/gcc.dg/analyzer/pr94851-4.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94858-1.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr94858-2.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/pr96651-1.c     |   4 +-
 gcc/testsuite/gcc.dg/analyzer/pragma-1.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c   |   2 +-
 gcc/testsuite/gcc.dg/analyzer/scope-1.c       |   2 +-
 gcc/testsuite/gcc.dg/analyzer/sensitive-1.c   |   8 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-2.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-3.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-5.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-6.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-7.c      |   3 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c     |   2 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-8.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/setjmp-9.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/signal-1.c      |   3 +-
 gcc/testsuite/gcc.dg/analyzer/signal-2.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/signal-3.c      |   6 +-
 gcc/testsuite/gcc.dg/analyzer/signal-4a.c     |   6 +-
 gcc/testsuite/gcc.dg/analyzer/signal-4b.c     |   6 +-
 gcc/testsuite/gcc.dg/analyzer/signal-5.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/signal-6.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/signal-exit.c   |   4 +-
 gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c   |   2 +-
 gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c   |   3 +-
 gcc/testsuite/gcc.dg/analyzer/single-field.c  |   2 +-
 gcc/testsuite/gcc.dg/analyzer/strcmp-1.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/strcpy-1.c      |   2 +-
 gcc/testsuite/gcc.dg/analyzer/strdup-1.c      |   4 +-
 gcc/testsuite/gcc.dg/analyzer/strndup-1.c     |   4 +-
 gcc/testsuite/gcc.dg/analyzer/symbolic-4.c    |   2 +-
 gcc/testsuite/gcc.dg/analyzer/taint-1.c       |   6 +-
 .../gcc.dg/analyzer/torture/conftest-1.c      |   2 +-
 .../gcc.dg/analyzer/torture/intptr_t.c        |   2 +-
 gcc/testsuite/gcc.dg/analyzer/torture/poc.c   |   2 +-
 .../gcc.dg/analyzer/torture/pr93374.c         |   2 +-
 gcc/testsuite/gcc.dg/analyzer/unknown-fns-2.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/unknown-fns-3.c |   2 +-
 gcc/testsuite/gcc.dg/analyzer/unknown-fns.c   |   2 +-
 .../gcc.dg/analyzer/use-after-free.c          |   2 +-
 gcc/testsuite/gcc.dg/analyzer/zlib-4.c        |   4 +-
 158 files changed, 297 insertions(+), 215 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/analyzer/analyzer-std-decls.h

diff --git a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue-2.c b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue-2.c
index 57fd30add7b..803d3db4b34 100644
--- a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue-2.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-show-duplicate-count" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct _krb5_data {
   char *data;
diff --git a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c
index 0fc865f599b..d65f6cf78f1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c
+++ b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-show-duplicate-count" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct _krb5_data {
   char *data;
diff --git a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-minimal.c b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-minimal.c
index 5edbdb1cc3e..dd953a82822 100644
--- a/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-minimal.c
+++ b/gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-minimal.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 typedef struct _krb5_data {
diff --git a/gcc/testsuite/gcc.dg/analyzer/FOLLOWUPS-pr94714.c b/gcc/testsuite/gcc.dg/analyzer/FOLLOWUPS-pr94714.c
index 87e983de4e4..a9a8656ced1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/FOLLOWUPS-pr94714.c
+++ b/gcc/testsuite/gcc.dg/analyzer/FOLLOWUPS-pr94714.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 int main (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-2.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-2.c
index 4120689586d..96056869bd0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 void test_2 (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-3.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-3.c
index 2eec5c939e5..c64f51bfdd5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-4.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-4.c
index 4e07d62bf2d..a8082624307 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-clang-paper-example-4.c
@@ -1,4 +1,4 @@
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 
 struct s { int data[2]; };
 void test_4 (struct s buf)
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-sj1.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-sj1.c
index 32df4dad06f..5ef0c044051 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-sj1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-sj1.c
@@ -1,7 +1,5 @@
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-
+#include "test-setjmp.h"
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 int main (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-1.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-1.c
index bbaeed7b0c6..764e5c68785 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-1.c
@@ -2,9 +2,8 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdio.h>
-#include <setjmp.h>
-
+#include "test-setjmp.h"
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 static jmp_buf buf;
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-2.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-2.c
index 7267b56d70b..6d6d3b40f4e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-setjmp-wikipedia-2.c
@@ -2,11 +2,8 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include "test-setjmp.h"
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 static void first();
diff --git a/gcc/testsuite/gcc.dg/analyzer/abort.c b/gcc/testsuite/gcc.dg/analyzer/abort.c
index 9497ae30b46..2a2cce2bb55 100644
--- a/gcc/testsuite/gcc.dg/analyzer/abort.c
+++ b/gcc/testsuite/gcc.dg/analyzer/abort.c
@@ -1,5 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern void foo ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c
index 93319932d44..9d7129c1b22 100644
--- a/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c
+++ b/gcc/testsuite/gcc.dg/analyzer/alloca-leak.c
@@ -1,6 +1,6 @@
 /* { dg-require-effective-target alloca } */
 
-#include <alloca.h>
+#include "analyzer-std-decls.h"
 
 void *test (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-std-decls.h b/gcc/testsuite/gcc.dg/analyzer/analyzer-std-decls.h
new file mode 100644
index 00000000000..6bfc2f67863
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-std-decls.h
@@ -0,0 +1,118 @@
+#ifndef ANALYZER_STD_DECLS
+#define ANALYZER_STD_DECLS 1
+
+#pragma GCC system_header
+
+/* Minimal <stdlib.h>.  */
+
+typedef long int ssize_t;
+typedef __SIZE_TYPE__ size_t;
+#define NULL ((void *)0)
+
+extern void *malloc (size_t __size)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__malloc__)) ;
+extern void free (void *__ptr)
+  __attribute__ ((__nothrow__ , __leaf__));
+extern void *calloc (size_t __nmemb, size_t __size)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__malloc__)) ;
+extern void *realloc (void *__ptr, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__warn_unused_result__));
+extern void exit (int __status)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__noreturn__));
+extern void abort (void)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__noreturn__));
+
+/* Minimal <alloca.h>.  */
+
+extern void *alloca (size_t __size)
+  __attribute__ ((__nothrow__ , __leaf__));
+
+/* Minimal <stdio.h>.  */
+
+typedef struct _IO_FILE FILE;
+extern struct _IO_FILE *stderr;
+
+extern FILE *fopen (const char *__restrict __filename,
+		    const char *__restrict __modes);
+extern int fclose (FILE *__stream);
+extern int fflush (FILE *__stream);
+extern int fflush_unlocked (FILE *__stream);
+extern int fprintf (FILE *__restrict __stream,
+		    const char *__restrict __format,
+		    ...);
+extern int printf (const char *__restrict __format, ...);
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
+extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
+extern int puts (const char *__s);
+extern int getchar (void);
+extern int ungetc (int __c, FILE *__stream);
+
+extern size_t fread (void *__restrict __ptr,
+		     size_t __size,
+		     size_t __n,
+		     FILE *__restrict __stream);
+
+extern size_t fwrite (const void *__restrict __ptr,
+		      size_t __size,
+		      size_t __n,
+		      FILE *__restrict __s);
+
+extern int fseek (FILE *__stream, long int __off, int __whence);
+#define SEEK_SET  0
+#define SEEK_CUR  1
+#define SEEK_END  2
+extern long int ftell (FILE *__stream);
+extern int ferror (FILE *__stream)
+  __attribute__ ((__nothrow__ , __leaf__));
+
+/* Minimal <string.h>.  */
+
+extern size_t strlen (const char *__s)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__pure__))
+  __attribute__ ((__nonnull__ (1)));
+extern void *memset (void *__s, int __c, size_t __n)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__nonnull__ (1)));
+extern int strcmp (const char *__s1, const char *__s2)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__pure__))
+  __attribute__ ((__nonnull__ (1, 2)));
+extern char *strcpy (char *__restrict __dest,
+		     const char *__restrict __src)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__nonnull__ (1, 2)));
+extern void *memcpy (void *__restrict __dest,
+		     const void *__restrict __src,
+		     size_t __n)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__nonnull__ (1, 2)));
+extern char *strdup (const char *s);
+extern char *strndup (const char *s, size_t n);
+
+/* Minimal <math.h>.  */
+
+extern int isnan (double value)
+  __attribute__ ((__nothrow__ , __leaf__))
+  __attribute__ ((__const__));
+
+/* Minimal <unistd.h>.  */
+
+extern char *getpass (const char *prompt)
+  __attribute__ ((__nonnull__ (1)));
+
+/* Minimal <signal.h>.  */
+
+typedef void (*__sighandler_t) (int);
+
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)
+  __attribute__ ((__nothrow__ , __leaf__));
+
+#define	SIGINT 2
+
+#endif /* #ifndef ANALYZER_STD_DECLS */
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
index f21cd377824..0772ef1bf79 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
@@ -1,7 +1,8 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=0" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-decls.h"
 
 void calls_free_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
index 6d6e70a8ae1..813d80d73e9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=1" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void calls_free_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
index 3d3316af1f9..e9352382df7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=2" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void calls_free_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
index 9faf5da3a4f..0938dfe69c9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2a.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-verbosity=2" } */
 
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 extern int foo ();
 extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3.c
index fb87d16f833..1ef73c3db3b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3.c
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret -fanalyzer-verbosity=3" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void calls_free_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
index 1b2b7983624..18856e4e20a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-3a.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-verbosity=3" } */
 
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 extern int foo ();
 extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/attribute-nonnull.c b/gcc/testsuite/gcc.dg/analyzer/attribute-nonnull.c
index 70bb921e742..465ec577ab6 100644
--- a/gcc/testsuite/gcc.dg/analyzer/attribute-nonnull.c
+++ b/gcc/testsuite/gcc.dg/analyzer/attribute-nonnull.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern void foo(void *ptrA, void *ptrB, void *ptrC) /* { dg-message "argument 1 of 'foo' must be non-null" } */
   __attribute__((nonnull (1, 3)));
diff --git a/gcc/testsuite/gcc.dg/analyzer/bzip2-arg-parse-1.c b/gcc/testsuite/gcc.dg/analyzer/bzip2-arg-parse-1.c
index 1f1d8294c33..dda6dcd6b30 100644
--- a/gcc/testsuite/gcc.dg/analyzer/bzip2-arg-parse-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/bzip2-arg-parse-1.c
@@ -2,8 +2,7 @@
    argument-parsing logic.
    Adapted from part of bzip2-1.0.8: bzip2.c: main.  */
 
-#include <stdlib.h>
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 /* This test file has been heavily modified from the bzip2.c original,
diff --git a/gcc/testsuite/gcc.dg/analyzer/call-summaries-1.c b/gcc/testsuite/gcc.dg/analyzer/call-summaries-1.c
index a64b230cef3..3cc25cf19c5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/call-summaries-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/call-summaries-1.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-call-summaries" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void calls_free (void *p)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-1.c b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-1.c
index 0f07818dcdd..ecacc4a21cc 100644
--- a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct ptr_wrapper
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-2.c b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-2.c
index ecca9aca83b..862778f0543 100644
--- a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct array_wrapper
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-3.c b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-3.c
index 49259262c4a..000878996f0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/compound-assignment-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/compound-assignment-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct union_wrapper
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
index 3f16a38ab14..9b2d840cd7f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c
@@ -1,10 +1,7 @@
 /* { dg-require-effective-target alloca } */
 
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <alloca.h>
 #include "analyzer-decls.h"
+#include "analyzer-std-decls.h"
 
 struct foo
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-10.c b/gcc/testsuite/gcc.dg/analyzer/data-model-10.c
index c261edcc827..7b78327b8bf 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-10.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-10.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct foo
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-13.c b/gcc/testsuite/gcc.dg/analyzer/data-model-13.c
index 31c1896b0c2..0587dab8523 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-13.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-13.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 union
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-14.c b/gcc/testsuite/gcc.dg/analyzer/data-model-14.c
index 1dbcb701123..d57ac3e50f1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-14.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-14.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *global_ptr;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-15.c b/gcc/testsuite/gcc.dg/analyzer/data-model-15.c
index 12e84a12420..c0c269597fd 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-15.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-15.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 
 struct coord
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-2.c b/gcc/testsuite/gcc.dg/analyzer/data-model-2.c
index d5be03ba565..72e083fa441 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-2.c
@@ -4,8 +4,7 @@
    hardcoding options?  Adapt from torture .exp, presumably.  */
 
 
-#include <stdlib.h>
-#include <string.h>
+#include "analyzer-std-decls.h"
 
 int test_1 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-20.c b/gcc/testsuite/gcc.dg/analyzer/data-model-20.c
index 8fdbb6b3df6..c4fbab08d68 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-20.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-20.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct foo { int dummy; };
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-4.c b/gcc/testsuite/gcc.dg/analyzer/data-model-4.c
index 33f90871dfb..f7ee905913a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-4.c
@@ -3,7 +3,8 @@
    optimizations levels, and with/without debuginfo, rather than
    hardcoding options?  Adapt from torture .exp, presumably.  */
 
-#include <stdio.h>
+#include "analyzer-std-decls.h"
+
 int
 main ()
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-5.c b/gcc/testsuite/gcc.dg/analyzer/data-model-5.c
index 2135c70eb8d..452647e714c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-5.c
@@ -1,8 +1,6 @@
 /* A toy re-implementation of CPython's object model.  */
 
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct base_obj
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-5b.c b/gcc/testsuite/gcc.dg/analyzer/data-model-5b.c
index cd6a4df00dd..cbaf8a3c55d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-5b.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-5b.c
@@ -1,8 +1,6 @@
 /* A toy re-implementation of CPython's object model.  */
 
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct base_obj base_obj;
 typedef struct type_obj type_obj;
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-5c.c b/gcc/testsuite/gcc.dg/analyzer/data-model-5c.c
index ad4e1d2644d..8c33752b7e0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-5c.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-5c.c
@@ -1,8 +1,6 @@
 /* A toy re-implementation of CPython's object model.  */
 
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct base_obj base_obj;
 typedef struct type_obj type_obj;
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-5d.c b/gcc/testsuite/gcc.dg/analyzer/data-model-5d.c
index b4d77a939bc..38a037392e8 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-5d.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-5d.c
@@ -1,8 +1,6 @@
 /* A toy re-implementation of CPython's object model.  */
 
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 typedef struct base_obj
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-9.c b/gcc/testsuite/gcc.dg/analyzer/data-model-9.c
index 159bc612576..6d11dc7cbd7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-9.c
@@ -1,5 +1,4 @@
-#include <stdlib.h>
-#include <string.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 struct foo
diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-path-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-path-1.c
index d7058ea18e0..0493553667b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/data-model-path-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/data-model-path-1.c
@@ -1,4 +1,4 @@
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 
 static int *__attribute__((noinline))
 callee (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/disabling.c b/gcc/testsuite/gcc.dg/analyzer/disabling.c
index a696d1e021e..ef17fa04692 100644
--- a/gcc/testsuite/gcc.dg/analyzer/disabling.c
+++ b/gcc/testsuite/gcc.dg/analyzer/disabling.c
@@ -1,7 +1,7 @@
 /* Verify that we can override -fanalyzer with -fno-analyzer.  */
 /* { dg-additional-options "-fno-analyzer" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/dot-output.c b/gcc/testsuite/gcc.dg/analyzer/dot-output.c
index ff418b156c0..92c3d574f15 100644
--- a/gcc/testsuite/gcc.dg/analyzer/dot-output.c
+++ b/gcc/testsuite/gcc.dg/analyzer/dot-output.c
@@ -4,7 +4,7 @@
 /* { dg-require-dot "" } */
 /* { dg-additional-options "-fdump-analyzer-callgraph -fdump-analyzer-exploded-graph -fdump-analyzer-state-purge -fdump-analyzer-supergraph" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 int some_call (int i, char ch)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-a.c b/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-a.c
index 61e78467732..7b817515000 100644
--- a/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-a.c
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-flto" } */
 /* { dg-additional-sources double-free-lto-1-b.c } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "double-free-lto-1.h"
 
 void test (void *ptr)
diff --git a/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-b.c b/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-b.c
index 6041e6983a2..478d6df50a9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-b.c
+++ b/gcc/testsuite/gcc.dg/analyzer/double-free-lto-1-b.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 #include "double-free-lto-1.h"
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/edges-1.c b/gcc/testsuite/gcc.dg/analyzer/edges-1.c
index 6b53ddddc05..3af15c114dd 100644
--- a/gcc/testsuite/gcc.dg/analyzer/edges-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/edges-1.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 extern int foo ();
 extern void bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/edges-2.c b/gcc/testsuite/gcc.dg/analyzer/edges-2.c
index 847a70883fb..224678cb8fd 100644
--- a/gcc/testsuite/gcc.dg/analyzer/edges-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/edges-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 int foo ();
 int bar ();
diff --git a/gcc/testsuite/gcc.dg/analyzer/explode-1.c b/gcc/testsuite/gcc.dg/analyzer/explode-1.c
index 9b95afd9a03..7f32699627e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/explode-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/explode-1.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int get (void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/explode-2.c b/gcc/testsuite/gcc.dg/analyzer/explode-2.c
index 70d8fecae8f..8365dbf503b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/explode-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/explode-2.c
@@ -6,7 +6,7 @@
 
 /* { dg-additional-options "--param analyzer-max-enodes-per-program-point=200 --param analyzer-bb-explosion-factor=50" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int get (void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-1.c b/gcc/testsuite/gcc.dg/analyzer/file-1.c
index f2b77b9db66..81965166d09 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-1.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 void
 test_1 (const char *path)
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-2.c b/gcc/testsuite/gcc.dg/analyzer/file-2.c
index aa0457071ea..b13753d4304 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-2.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 struct foo
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c b/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
index d346f7a7c9a..164ebd0d42d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-paths-1.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-verbosity=3" } */
 
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 /* Verify that we correctly emit CFG events in the face of buffers
    being clobbered in these leak reports.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c b/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
index 68f49c25607..4352d3e0235 100644
--- a/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
+++ b/gcc/testsuite/gcc.dg/analyzer/file-pr58237.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 void f0(const char *str)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/first-field-2.c b/gcc/testsuite/gcc.dg/analyzer/first-field-2.c
index 2fb98d3c9d7..2df353be9f0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/first-field-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/first-field-2.c
@@ -1,7 +1,6 @@
 /* A toy re-implementation of CPython's object model.  */
 
-#include <stdlib.h>
-#include <string.h>
+#include "analyzer-std-decls.h"
 
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/function-ptr-1.c b/gcc/testsuite/gcc.dg/analyzer/function-ptr-1.c
index 38c3e597d7e..62e243e74a5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/function-ptr-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/function-ptr-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef void *(*fn_ptr_t) (void *);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/function-ptr-2.c b/gcc/testsuite/gcc.dg/analyzer/function-ptr-2.c
index 411b1b39377..763ab86aaf4 100644
--- a/gcc/testsuite/gcc.dg/analyzer/function-ptr-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/function-ptr-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 typedef void (*fn_ptr_t) (void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/function-ptr-3.c b/gcc/testsuite/gcc.dg/analyzer/function-ptr-3.c
index 348ee4a0cb3..966e1c8d3e0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/function-ptr-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/function-ptr-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef void *(*alloc_func_t) (size_t);
 typedef void (*free_func_t) (void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/getchar-1.c b/gcc/testsuite/gcc.dg/analyzer/getchar-1.c
index 25595e0786e..c7fd5495a6f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/getchar-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/getchar-1.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 int test_1 (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/gzio.c b/gcc/testsuite/gcc.dg/analyzer/gzio.c
index 54efa77d056..824cf05c308 100644
--- a/gcc/testsuite/gcc.dg/analyzer/gzio.c
+++ b/gcc/testsuite/gcc.dg/analyzer/gzio.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 typedef struct z_stream_s {
   unsigned char *next_out;
 } z_stream;
diff --git a/gcc/testsuite/gcc.dg/analyzer/leak-2.c b/gcc/testsuite/gcc.dg/analyzer/leak-2.c
index bba3e816db7..7dd88c2f16c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/leak-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/leak-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *ptr;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c b/gcc/testsuite/gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
index 2b0352711ae..5a7b6456a26 100644
--- a/gcc/testsuite/gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
+++ b/gcc/testsuite/gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/loop-3.c b/gcc/testsuite/gcc.dg/analyzer/loop-3.c
index 0bcf7074623..1520999f700 100644
--- a/gcc/testsuite/gcc.dg/analyzer/loop-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/loop-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test(int c)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
index c3e1330ec6a..681fc96e38f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-1.c
@@ -1,7 +1,6 @@
 /* { dg-require-effective-target alloca } */
 
-#include <alloca.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (void);
 extern int bar (void);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-3.c b/gcc/testsuite/gcc.dg/analyzer/malloc-3.c
index 5afb6b3b0f7..344b9a740ad 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 /* Don't complain about leaks due to exiting from "main".  */
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-4.c b/gcc/testsuite/gcc.dg/analyzer/malloc-4.c
index 908bb28ee50..3c8add66521 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-4.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-Wno-incompatible-pointer-types" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct foo;
 struct bar;
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-5.c b/gcc/testsuite/gcc.dg/analyzer/malloc-5.c
index b75135f26a3..66cb9c81040 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-5.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c b/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c
index 901ca5c46fd..5a99892ecb3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-callbacks.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef void *(*allocator_t) (size_t);
 typedef void (*deallocator_t) (void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-dce.c b/gcc/testsuite/gcc.dg/analyzer/malloc-dce.c
index 1b4b8788b86..a6e368c7d11 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-dce.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-dce.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-O2" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test(void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-dedupe-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-dedupe-1.c
index 233ab485b5a..7b468a06980 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-dedupe-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-dedupe-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern void foo (void);
 extern void bar (void);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-in-loop.c b/gcc/testsuite/gcc.dg/analyzer/malloc-in-loop.c
index a8c85a9c618..c727de461a9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-in-loop.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-in-loop.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern void foo (int *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-1.c
index ad536ce5f02..46d453b95d3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *
 calls_malloc (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-10.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-10.c
index f3a5be51ff1..37bf44ddab5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-10.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-10.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void
 calls_free (void *victim) /* { dg-message "\\(3\\) entry to 'calls_free'" "event 3" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
index b65ff9165e4..f212e64e3d3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int some_condition ();
 extern void do_stuff (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-12.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-12.c
index fce5437edd1..67d6a4a98ff 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-12.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-12.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void recursive_free (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
index 2e3d80ed5cc..b702cce9d2e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-verbosity=1" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void
 calls_free (void *victim)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
index 800dd63a031..9315cee3b46 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-verbosity=1" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void
 calls_free (void *victim) /* { dg-message "\\(3\\) entry to 'calls_free'" "event 3" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-3.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-3.c
index 3dcfae8f0a2..2c7fd70f15f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *
 calls_malloc (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-4.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-4.c
index 82d50bd3c93..d00e22e268f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-4.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 static void calls_free(int *q)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-5.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-5.c
index c66ecb5c563..cd43442e002 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-5.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 static int *calls_malloc(void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-6.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-6.c
index 62f8b55c364..afc28ae21db 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-6.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *
 calls_malloc (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-7.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-7.c
index 0742370d2f9..f0d60d69a4e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-7.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-7.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 /**************************************************************************/
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-double-free.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-double-free.c
index 580862b0138..10ce56c9350 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-double-free.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-double-free.c
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-checker=malloc -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *wrapped_malloc (size_t size)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-a.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-a.c
index c34e4beee4b..5a3c153dad3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-a.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "malloc-ipa-8-lto.h"
 
 void *wrapped_malloc (size_t size)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-b.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-b.c
index c9d7df1a452..682b9468f5e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-b.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-b.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "malloc-ipa-8-lto.h"
 
 boxed_int *
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c
index d332db13ef0..cc85e51b3a7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-flto" } */
 /* { dg-additional-sources "malloc-ipa-8-lto-a.c malloc-ipa-8-lto-b.c" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "malloc-ipa-8-lto.h"
 
 void test (int i)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
index 320044753a1..f5396207d04 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
@@ -3,7 +3,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-checker=malloc -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void *wrapped_malloc (size_t size)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
index a0c78fd6c4e..b76591859ba 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fdiagnostics-path-format=none -fanalyzer-verbosity=1" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void
 two_frees (void *p, void *q)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-1.c
index 82ad547a201..6a46a3b683a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 /* Ensure that we don't need to laboriously walk every path to get
    to the end of the function.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-2.c b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-2.c
index 9f6440b52b2..a7aba8d848e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 /* Ensure that we don't get an exponential growth in paths due to
    repeated diamonds in the CFG.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-3.c b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-3.c
index e5d27a4a33a..c6b2c349601 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-many-paths-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-1.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-1.c
index 0436928238c..c0c2c31e004 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-1.c
@@ -1,6 +1,6 @@
 /* Verify that we emit sane paths for state machine errors.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test_1 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-10.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-10.c
index ef88388267b..d06d0380206 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-10.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-10.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 int test (int flag)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-2.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-2.c
index 27098da1996..2aa10e10107 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-2.c
@@ -1,6 +1,6 @@
 /* Verify that we emit sane paths for state machine errors.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test_2 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-3.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-3.c
index 8f9e4cff6e2..496b5c1a1ce 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-3.c
@@ -1,6 +1,6 @@
 /* Verify that we emit sane paths for state machine errors.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 int *test_3 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-4.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-4.c
index 7b7803eac45..007c0e24e75 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-4.c
@@ -1,6 +1,6 @@
 /* Verify that we emit sane paths for state machine errors.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 int *test_4 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c
index ca8d22be7b0..39f3b21e80b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c
@@ -1,5 +1,4 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern void do_stuff (void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c
index 1df6964544e..dd1fd8b2a78 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-6.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-7.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-7.c
index f6b99e35a43..37e5785f589 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-7.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-7.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (void);
 extern int bar (void);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c
index 35c9385b206..b3debbc4b6e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-8.c
@@ -1,9 +1,7 @@
 /* { dg-additional-options "-fanalyzer-transitivity" } */
 /* { dg-require-effective-target alloca } */
 
-#include <stddef.h>
-#include <alloca.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern void do_stuff (const void *);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
index a3cacc07fab..3620fb1bc42 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-show-caret" } */
 /* { dg-enable-nn-line-numbers "" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test_1 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1a.c b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1a.c
index bf77862e67c..dc211619420 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1a.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fno-analyzer-call-summaries -fanalyzer-transitivity" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1b.c b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1b.c
index a30b8c0e080..323c2bab9ef 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1b.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-1b.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-call-summaries" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-2.c b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-2.c
index 9001fe66cd7..c30e79b627a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-3.c b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-3.c
index 0196389d3a5..b0190c1caa8 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-3.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-4.c b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-4.c
index 7410a717762..6a7b13d7b9a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-vs-local-4.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void __attribute__((noinline)) callee_1 (int *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c b/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
index f120eac19b3..d561832f43f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/memcpy-1.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 void *test_1 (void *dst, void *src, size_t n)
diff --git a/gcc/testsuite/gcc.dg/analyzer/memset-1.c b/gcc/testsuite/gcc.dg/analyzer/memset-1.c
index 5748aa1af84..2a244e1d2d0 100644
--- a/gcc/testsuite/gcc.dg/analyzer/memset-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/memset-1.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 /* Zero-fill of uninitialized buffer.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/params-2.c b/gcc/testsuite/gcc.dg/analyzer/params-2.c
index 433c658720f..20c6055afcf 100644
--- a/gcc/testsuite/gcc.dg/analyzer/params-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/params-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 static void ensure_equal (int a, int b)
diff --git a/gcc/testsuite/gcc.dg/analyzer/paths-3.c b/gcc/testsuite/gcc.dg/analyzer/paths-3.c
index b5ab810e536..62fe7c8c062 100644
--- a/gcc/testsuite/gcc.dg/analyzer/paths-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/paths-3.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-transitivity" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 int test_1 (int a, int b)
diff --git a/gcc/testsuite/gcc.dg/analyzer/paths-6.c b/gcc/testsuite/gcc.dg/analyzer/paths-6.c
index ef1a4e6c04d..6cda18976fb 100644
--- a/gcc/testsuite/gcc.dg/analyzer/paths-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/paths-6.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 /* Verify that ordering of writes doesn't matter when merging states.  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/paths-7.c b/gcc/testsuite/gcc.dg/analyzer/paths-7.c
index 8caaee8a3fd..37402be3bff 100644
--- a/gcc/testsuite/gcc.dg/analyzer/paths-7.c
+++ b/gcc/testsuite/gcc.dg/analyzer/paths-7.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c b/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
index 1306f6de575..d46c3d68f99 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-fanalyzer-checker=pattern-test" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern void foo(void *);
 extern void bar(void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93290.c b/gcc/testsuite/gcc.dg/analyzer/pr93290.c
index fa35629d955..1c713f5d902 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr93290.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr93290.c
@@ -1,4 +1,4 @@
-#include <math.h>
+#include "analyzer-std-decls.h"
 
 int test_1 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94399.c b/gcc/testsuite/gcc.dg/analyzer/pr94399.c
index e897c04a007..a900a8fabaa 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94399.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94399.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 #define _cleanup_(f) __attribute__((cleanup(f)))
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94458.c b/gcc/testsuite/gcc.dg/analyzer/pr94458.c
index ad9bfc94ad4..6738d7cd027 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94458.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94458.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct ret
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94639.c b/gcc/testsuite/gcc.dg/analyzer/pr94639.c
index 2dbb57e39ec..21c6d31c6d6 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94639.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94639.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 
 void validatedatetime(const char *str)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94640.c b/gcc/testsuite/gcc.dg/analyzer/pr94640.c
index 9722a179fcd..1922ada8c34 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94640.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94640.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
   
 int debug;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94851-1.c b/gcc/testsuite/gcc.dg/analyzer/pr94851-1.c
index da79652c570..56f0c67e391 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94851-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94851-1.c
@@ -1,7 +1,6 @@
 /* { dg-additional-options "-O2" } */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef struct AMARK {
   struct AMARK *m_next;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94851-4.c b/gcc/testsuite/gcc.dg/analyzer/pr94851-4.c
index 2a15a5d7f5b..3a3e0ac2e54 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94851-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94851-4.c
@@ -1,6 +1,6 @@
 /* { dg-additional-options "-O2" } */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 struct List {
     struct List *next;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c b/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
index f7be1c617da..cef979a8416 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94858-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef short hashNx;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr94858-2.c b/gcc/testsuite/gcc.dg/analyzer/pr94858-2.c
index 874fe8b2c75..435cd682710 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr94858-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr94858-2.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 typedef short hashNx;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr96651-1.c b/gcc/testsuite/gcc.dg/analyzer/pr96651-1.c
index 2f3a9b44a2c..a4d454c677a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr96651-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr96651-1.c
@@ -1,6 +1,4 @@
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 static int a;
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/pragma-1.c b/gcc/testsuite/gcc.dg/analyzer/pragma-1.c
index 2e533489405..8d300399775 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pragma-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pragma-1.c
@@ -1,6 +1,6 @@
 /* Verify that we can disable analyzer warnings via pragmas.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 void test_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c b/gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c
index 9f6ccb6dc27..cbade43af4b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c
+++ b/gcc/testsuite/gcc.dg/analyzer/rhbz1878600.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "analyzer-std-decls.h"
 
 #define INI_MAX_LINE 200
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/scope-1.c b/gcc/testsuite/gcc.dg/analyzer/scope-1.c
index f8acffa18e4..684128f3ccf 100644
--- a/gcc/testsuite/gcc.dg/analyzer/scope-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/scope-1.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 int test_1 (void)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c b/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c
index 81144af620e..587cc5e3d79 100644
--- a/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/sensitive-1.c
@@ -1,10 +1,4 @@
-#include <stdio.h>
-
-/* Solaris needs this for <unistd.h> to declare getpass.  */
-#define __EXTENSIONS__
-#include <unistd.h>
-
-#include <string.h>
+#include "analyzer-std-decls.h"
 
 char test_1 (FILE *logfile)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c
index f5d9c53e239..f89dfdd00c2 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-2.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern void foo (int);
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c
index 3e4f870e5e8..e0779bd8c5e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-3.c
@@ -2,7 +2,7 @@
 /* { dg-enable-nn-line-numbers "" } */
 /* { dg-require-effective-target indirect_jumps } */
 
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "test-setjmp.h"
 #include "analyzer-decls.h"
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c
index bf5b9bfda81..06179cdc86b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-5.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 static jmp_buf env;
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c
index 3aa6b23d6b3..70e2a5e8cab 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-6.c
@@ -1,8 +1,8 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c
index 6a519b7e138..4d42ebe872d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-7.c
@@ -1,8 +1,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c
index 220f95e0d05..1002bc2c91c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-7a.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c
index 79614d123bd..a067ca77a3a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-8.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
diff --git a/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c b/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c
index c2b00e3b95c..25b96101273 100644
--- a/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/setjmp-9.c
@@ -3,7 +3,7 @@
 /* { dg-require-effective-target indirect_jumps } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-1.c b/gcc/testsuite/gcc.dg/analyzer/signal-1.c
index 43f911ba648..62a0bc7cf55 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-1.c
@@ -3,8 +3,7 @@
    not allowed from a signal handler.  */
 /* { dg-require-effective-target signal } */
 
-#include <stdio.h>
-#include <signal.h>
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-2.c b/gcc/testsuite/gcc.dg/analyzer/signal-2.c
index d047c677c41..fd27ce25b2e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-2.c
@@ -3,8 +3,8 @@
    not allowed from a signal handler.  */
 /* { dg-require-effective-target signal } */
 
-#include <stdio.h>
-#include <signal.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-3.c b/gcc/testsuite/gcc.dg/analyzer/signal-3.c
index f5072b52f08..f19c6b05638 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-3.c
@@ -1,7 +1,7 @@
 /* { dg-require-effective-target signal } */
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-4a.c b/gcc/testsuite/gcc.dg/analyzer/signal-4a.c
index 4ee6f0e7d0e..6a3c2b0525a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-4a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-4a.c
@@ -4,9 +4,9 @@
 /* { dg-enable-nn-line-numbers "" } */
 /* { dg-require-effective-target signal } */
 
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-4b.c b/gcc/testsuite/gcc.dg/analyzer/signal-4b.c
index cb1e7e475ae..902cd6a2c2a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-4b.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-4b.c
@@ -4,9 +4,9 @@
 /* { dg-enable-nn-line-numbers "" } */
 /* { dg-require-effective-target signal } */
 
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-5.c b/gcc/testsuite/gcc.dg/analyzer/signal-5.c
index 81ac812ebbd..dd81012d0a9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-5.c
@@ -1,8 +1,8 @@
 /* Example of other bad calls within a signal handler.  */
 /* { dg-require-effective-target signal } */
 
-#include <stdlib.h>
-#include <signal.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void do_stuff (void *ptr);
 extern void body_of_program(void);
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-6.c b/gcc/testsuite/gcc.dg/analyzer/signal-6.c
index ea2290c4296..ae3041f565e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-6.c
@@ -1,6 +1,6 @@
 /* { dg-require-effective-target signal } */
-#include <stdio.h>
-#include <signal.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/signal-exit.c b/gcc/testsuite/gcc.dg/analyzer/signal-exit.c
index 41a819b838c..c2c927868ff 100644
--- a/gcc/testsuite/gcc.dg/analyzer/signal-exit.c
+++ b/gcc/testsuite/gcc.dg/analyzer/signal-exit.c
@@ -3,8 +3,8 @@
    from a signal handler.  But '_exit' is allowed.  */
 /* { dg-require-effective-target signal } */
 
-#include <signal.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 extern void body_of_program(void);
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c
index d6a9910478c..bd4f52c4d0d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-5.c
@@ -1,7 +1,7 @@
 /* { dg-require-effective-target sigsetjmp } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 static jmp_buf env;
diff --git a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c
index f89277efc48..bd028038aa8 100644
--- a/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c
+++ b/gcc/testsuite/gcc.dg/analyzer/sigsetjmp-6.c
@@ -1,8 +1,7 @@
 /* { dg-require-effective-target sigsetjmp } */
 
 #include "test-setjmp.h"
-#include <stddef.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 extern int foo (int) __attribute__ ((__pure__));
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/single-field.c b/gcc/testsuite/gcc.dg/analyzer/single-field.c
index d54cfb0c4d1..d178e43c1c7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/single-field.c
+++ b/gcc/testsuite/gcc.dg/analyzer/single-field.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 struct foo
diff --git a/gcc/testsuite/gcc.dg/analyzer/strcmp-1.c b/gcc/testsuite/gcc.dg/analyzer/strcmp-1.c
index cc50a6fdba5..7676174eff2 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strcmp-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strcmp-1.c
@@ -1,7 +1,7 @@
 /* Verify that we clarify the sense of paths involving strcmp.  */
 
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 int test_1 (const char *str, char *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/strcpy-1.c b/gcc/testsuite/gcc.dg/analyzer/strcpy-1.c
index ed5bab98e4b..fc58dacc4db 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strcpy-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strcpy-1.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 char *
diff --git a/gcc/testsuite/gcc.dg/analyzer/strdup-1.c b/gcc/testsuite/gcc.dg/analyzer/strdup-1.c
index 6b950ca23a9..ed1082d8f9c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strdup-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strdup-1.c
@@ -1,5 +1,5 @@
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+
 
 extern void requires_nonnull (void *ptr)
   __attribute__((nonnull));
diff --git a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
index 23d9b6070ce..588547d3fb7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
@@ -1,5 +1,5 @@
-#include <string.h>
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
+
 
 extern void requires_nonnull (void *ptr)
   __attribute__((nonnull));
diff --git a/gcc/testsuite/gcc.dg/analyzer/symbolic-4.c b/gcc/testsuite/gcc.dg/analyzer/symbolic-4.c
index a466f912007..c368743b992 100644
--- a/gcc/testsuite/gcc.dg/analyzer/symbolic-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/symbolic-4.c
@@ -1,4 +1,4 @@
-#include <string.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 void test_1 (int i, int j, int k)
diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-1.c
index cd46dd5fc14..d48b8a6a9a7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/taint-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/taint-1.c
@@ -1,8 +1,8 @@
 /* { dg-additional-options "-fanalyzer-checker=taint" } */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 struct foo
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/conftest-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/conftest-1.c
index 0cf85f0ebe1..733eeb4699d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/conftest-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/conftest-1.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "../analyzer-std-decls.h"
 int
 main ()
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/intptr_t.c b/gcc/testsuite/gcc.dg/analyzer/torture/intptr_t.c
index 847ba626350..920691e6475 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/intptr_t.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/intptr_t.c
@@ -1,6 +1,6 @@
 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
 
-#include <stdlib.h>
+#include "../analyzer-std-decls.h"
 
 typedef __INTPTR_TYPE__ intptr_t;
 typedef __UINTPTR_TYPE__ uintptr_t;
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/poc.c b/gcc/testsuite/gcc.dg/analyzer/torture/poc.c
index 1ad45b2f63e..38f5df6eaa9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/poc.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/poc.c
@@ -1,6 +1,6 @@
 /* { dg-do link } */
 
-#include <stdlib.h>
+#include "../analyzer-std-decls.h"
 
 void test_1 (void *ptr)
 {
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr93374.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr93374.c
index a7adecdc872..148f387709b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/torture/pr93374.c
+++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr93374.c
@@ -1,2 +1,2 @@
-#include <stdlib.h>
+#include "../analyzer-std-decls.h"
 #include "../../../gcc.c-torture/execute/pr27073.c"
diff --git a/gcc/testsuite/gcc.dg/analyzer/unknown-fns-2.c b/gcc/testsuite/gcc.dg/analyzer/unknown-fns-2.c
index 1c4bdd6b51b..dc9f6ba4bf9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/unknown-fns-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/unknown-fns-2.c
@@ -1,6 +1,6 @@
 /* Tests for data model handling of unknown fns.  */
 
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 void unknown_fn (void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/unknown-fns-3.c b/gcc/testsuite/gcc.dg/analyzer/unknown-fns-3.c
index 095df5e77a7..b20020a8fff 100644
--- a/gcc/testsuite/gcc.dg/analyzer/unknown-fns-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/unknown-fns-3.c
@@ -1,6 +1,6 @@
 /* Tests for handling constraints on results of unknown fns.  */
 
-#include <stddef.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 void unknown_fn (void *);
diff --git a/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c b/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c
index fd1ecbb7005..861549d326c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c
+++ b/gcc/testsuite/gcc.dg/analyzer/unknown-fns.c
@@ -1,7 +1,7 @@
 /* Verify that the analyzer correctly purges state when it sees a call to
    an unknown function.  */
 
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 
 /* Verify fix for false-positive when checking for CVE-2005-1689.  */
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/use-after-free.c b/gcc/testsuite/gcc.dg/analyzer/use-after-free.c
index d7e4bc2c6ca..acfcf566b71 100644
--- a/gcc/testsuite/gcc.dg/analyzer/use-after-free.c
+++ b/gcc/testsuite/gcc.dg/analyzer/use-after-free.c
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include "analyzer-std-decls.h"
 #include "analyzer-decls.h"
 
 struct link { struct link *next; };
diff --git a/gcc/testsuite/gcc.dg/analyzer/zlib-4.c b/gcc/testsuite/gcc.dg/analyzer/zlib-4.c
index ae2f6c9f8ad..1bc257cd98c 100644
--- a/gcc/testsuite/gcc.dg/analyzer/zlib-4.c
+++ b/gcc/testsuite/gcc.dg/analyzer/zlib-4.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
-#include <string.h>
+#include "analyzer-std-decls.h"
+#include "analyzer-std-decls.h"
 
 typedef unsigned char Byte;
 typedef unsigned int uInt;
-- 
2.26.2

