https://gcc.gnu.org/g:90c558ef740d0b98892b6a7811c278eda8adeea3

commit r15-1749-g90c558ef740d0b98892b6a7811c278eda8adeea3
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Mon Jul 1 12:10:50 2024 +0200

    testsuite/52641 - Adjust some test cases to less capable platforms.
    
            PR testsuite/52641
    gcc/testsuite/
            * gcc.dg/analyzer/pr109577.c: Use __SIZE_TYPE__ instead of 
"unsigned long".
            * gcc.dg/analyzer/pr93032-mztools-signed-char.c: Requires int32plus.
            * gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: Requires 
int32plus.
            * gcc.dg/analyzer/putenv-1.c: Skip on avr.
            * gcc.dg/torture/type-generic-1.c: Skip on avr.

Diff:
---
 gcc/testsuite/gcc.dg/analyzer/pr109577.c                      | 8 ++++----
 gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c   | 1 +
 gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c | 1 +
 gcc/testsuite/gcc.dg/analyzer/putenv-1.c                      | 1 +
 gcc/testsuite/gcc.dg/torture/type-generic-1.c                 | 1 +
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/analyzer/pr109577.c 
b/gcc/testsuite/gcc.dg/analyzer/pr109577.c
index 74d1629f3c7..18417818b54 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr109577.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr109577.c
@@ -2,18 +2,18 @@
    Therefore this test has been duplicated as
    c-c++-common/analyzer/pr109577-noexcept.c  */
 
-void *malloc (unsigned long);
+void *malloc (__SIZE_TYPE__);
 
 double *
-unsafe (unsigned long n)
+unsafe (__SIZE_TYPE__ n)
 {
   return (double *) malloc (n * sizeof (double));
 }
 
 double *
-safer (unsigned long n)
+safer (__SIZE_TYPE__ n)
 {
-  unsigned long nbytes;
+  __SIZE_TYPE__ nbytes;
   if (__builtin_mul_overflow (n, sizeof (double), &nbytes))
     return 0;
   return (double *) malloc (nbytes); /* Exceptions enabled cause a leak here. 
*/
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c 
b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c
index 45599e228b8..7a7320fca2b 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-signed-char.c
@@ -5,6 +5,7 @@
 
 /* { dg-do "compile" } */
 /* { dg-additional-options "-fsigned-char" } */
+/* { dg-require-effective-target int32plus } */
 
 /* TODO (PR analyzer/112528): remove need for this.  */
 /* { dg-additional-options "--param analyzer-max-enodes-per-program-point=40 
--param analyzer-bb-explosion-factor=10" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c 
b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c
index a59fc49c2b3..10832757127 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pr93032-mztools-unsigned-char.c
@@ -5,6 +5,7 @@
 
 /* { dg-do "compile" } */
 /* { dg-additional-options "-funsigned-char" } */
+/* { dg-require-effective-target int32plus } */
 
 /* TODO (PR analyzer/112528): remove need for this.  */
 /* { dg-additional-options "--param analyzer-max-enodes-per-program-point=40 
--param analyzer-bb-explosion-factor=10" } */
diff --git a/gcc/testsuite/gcc.dg/analyzer/putenv-1.c 
b/gcc/testsuite/gcc.dg/analyzer/putenv-1.c
index 5c4e08c68df..2be52f05033 100644
--- a/gcc/testsuite/gcc.dg/analyzer/putenv-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/putenv-1.c
@@ -1,5 +1,6 @@
 /* { dg-additional-options "-Wno-analyzer-null-argument" } */
 /* { dg-require-effective-target alloca } */
+/* { dg-skip-if "has no putenv" { "avr-*-*" } } */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/type-generic-1.c 
b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
index b2aacd933f8..1dd0534a5fb 100644
--- a/gcc/testsuite/gcc.dg/torture/type-generic-1.c
+++ b/gcc/testsuite/gcc.dg/torture/type-generic-1.c
@@ -4,6 +4,7 @@
 /* { dg-do run } */
 /* { dg-require-effective-target inf } */
 /* { dg-skip-if "No subnormal support" { csky-*-* } { "-mhard-float" } } */
+/* { dg-skip-if "Not fully IEEE" { "avr-*-*" } } */
 /* { dg-options "-DUNSAFE" { target tic6x*-*-* visium-*-* nvptx-*-* } } */
 /* { dg-add-options ieee } */

Reply via email to