Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r12-7180-g8383d41d704571d7ca234c7d2f551b7b69255194.

gcc/testsuite/ChangeLog:
        PR analyzer/102052
        * gcc.dg/analyzer/fields.c (size_t): Use __SIZE_TYPE__ rather than
        hardcoding long unsigned int.
        * gcc.dg/analyzer/gzio-3.c (size_t): Likewise.
        * gcc.dg/analyzer/gzio-3a.c (size_t): Likewise.
        * gcc.dg/analyzer/pr98969.c (test_1): Use __UINTPTR_TYPE__ rather
        than long int.
        (test_2): Likewise.
        * gcc.dg/analyzer/pr99716-2.c (test_mountpoint): Use "rand" rather
        than "random".
        * gcc.dg/analyzer/pr99774-1.c (size_t): Use __SIZE_TYPE__ rather
        than hardcoding long unsigned int.
        * gcc.dg/analyzer/strndup-1.c: Add MinGW to targets that don't
        implement strndup.
        * gcc.dg/analyzer/zlib-5.c (size_t): Use __SIZE_TYPE__ rather
        than hardcoding long unsigned int.

Signed-off-by: David Malcolm <dmalc...@redhat.com>
---
 gcc/testsuite/gcc.dg/analyzer/fields.c    | 2 +-
 gcc/testsuite/gcc.dg/analyzer/gzio-3.c    | 2 +-
 gcc/testsuite/gcc.dg/analyzer/gzio-3a.c   | 2 +-
 gcc/testsuite/gcc.dg/analyzer/pr98969.c   | 4 ++--
 gcc/testsuite/gcc.dg/analyzer/pr99716-2.c | 2 +-
 gcc/testsuite/gcc.dg/analyzer/pr99774-1.c | 2 +-
 gcc/testsuite/gcc.dg/analyzer/strndup-1.c | 2 +-
 gcc/testsuite/gcc.dg/analyzer/zlib-5.c    | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/analyzer/fields.c 
b/gcc/testsuite/gcc.dg/analyzer/fields.c
index de55208070a..0bf877fcf1e 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fields.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fields.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 
 extern size_t strlen (const char *__s)
   __attribute__ ((__nothrow__ , __leaf__))
diff --git a/gcc/testsuite/gcc.dg/analyzer/gzio-3.c 
b/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
index 0a11f65fdca..426683244ff 100644
--- a/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
+++ b/gcc/testsuite/gcc.dg/analyzer/gzio-3.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 typedef struct _IO_FILE FILE;
 extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n,
                     FILE *__restrict __stream);
diff --git a/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c 
b/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
index 15ed0103fe0..faf86fa3877 100644
--- a/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
+++ b/gcc/testsuite/gcc.dg/analyzer/gzio-3a.c
@@ -1,4 +1,4 @@
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 typedef struct _IO_FILE FILE;
 extern size_t fread(void *__restrict __ptr, size_t __size, size_t __n,
                     FILE *__restrict __stream);
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr98969.c 
b/gcc/testsuite/gcc.dg/analyzer/pr98969.c
index 7e1587d7094..e4e4f059197 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr98969.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr98969.c
@@ -4,14 +4,14 @@ struct foo
 };
 
 void
-test_1 (long int i)
+test_1 (__UINTPTR_TYPE__ i)
 {
   struct foo *f = (struct foo *)i;
   f->expr = __builtin_malloc (1024);
 } /* { dg-bogus "leak" } */
 
 void
-test_2 (long int i)
+test_2 (__UINTPTR_TYPE__ i)
 {
   __builtin_free (((struct foo *)i)->expr);
   __builtin_free (((struct foo *)i)->expr); /* { dg-warning "double-'free' of 
'\\*\\(\\(struct foo \\*\\)i\\)\\.expr'" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c 
b/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
index 7c9881c61ff..adc9819643a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99716-2.c
@@ -10,7 +10,7 @@ extern int foo (void);
 void
 test_mountpoint (const char *mp)
 {
-  const int nr_passes = 5 + (random () & 31);
+  const int nr_passes = 5 + (rand () & 31);
   int pass;
   int ret = 1;
   FILE *fp;
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c 
b/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
index 620cf6571ed..a0bca8b1fe2 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr99774-1.c
@@ -7,7 +7,7 @@ typedef unsigned char uint8_t;
 typedef unsigned short uint16_t;
 typedef unsigned long uint64_t;
 typedef unsigned long uint64_t;
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 
 extern void *calloc(size_t __nmemb, size_t __size)
   __attribute__((__nothrow__, __leaf__))
diff --git a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c 
b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
index 58223533b5d..edf494ac284 100644
--- a/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/strndup-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* } } */
+/* { dg-skip-if "no strndup in libc" { *-*-darwin[789]* *-*-darwin10* 
*-*-mingw* } } */
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/zlib-5.c 
b/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
index afb61023330..1e3746d91fc 100644
--- a/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
+++ b/gcc/testsuite/gcc.dg/analyzer/zlib-5.c
@@ -2,7 +2,7 @@
 
 #include "analyzer-decls.h"
 
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 typedef unsigned char Byte;
 typedef unsigned int uInt;
 typedef unsigned long uLong;
-- 
2.26.3

Reply via email to