diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-07-01 12:10:50 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-07-01 13:07:34 +0200 |
commit | 90c558ef740d0b98892b6a7811c278eda8adeea3 (patch) | |
tree | 35423617bc6db153d6b995add2eeb0f300cd2499 /gcc | |
parent | 64001441ec99b80e457188ce50bb6c59c757d3c6 (diff) | |
download | gcc-90c558ef740d0b98892b6a7811c278eda8adeea3.zip gcc-90c558ef740d0b98892b6a7811c278eda8adeea3.tar.gz gcc-90c558ef740d0b98892b6a7811c278eda8adeea3.tar.bz2 |
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.
Diffstat (limited to 'gcc')
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 74d1629..1841781 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 45599e2..7a7320f 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 a59fc49..1083275 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 5c4e08c..2be52f0 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 b2aacd9..1dd0534 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 } */ |