diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-07-06 15:02:28 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-07-06 15:12:04 +0200 |
commit | bb16e3179e79e4307f1d834a02e63d0dfd817f67 (patch) | |
tree | 04f3c39ce4a3c41988e511f67573902975f296a5 | |
parent | cb9badea8be5396afe90f4c497e9f333cce1cb3f (diff) | |
download | gcc-bb16e3179e79e4307f1d834a02e63d0dfd817f67.zip gcc-bb16e3179e79e4307f1d834a02e63d0dfd817f67.tar.gz gcc-bb16e3179e79e4307f1d834a02e63d0dfd817f67.tar.bz2 |
testsuite/52641 - Fix more sloppy tests.
PR testsuite/52641
gcc/testsuite/
* gcc.dg/analyzer/torture/boxed-ptr-1.c: Requires size24plus.
* gcc.dg/analyzer/torture/pr102692.c: Use intptr_t instead of long.
* gcc.dg/ipa/pr102714.c: Use uintptr_t instead of unsigned long.
* gcc.dg/torture/pr115387-1.c: Same.
* gcc.dg/torture/pr113895-1.c : Same.
* gcc.dg/ipa/pr108007.c: Require int32plus.
* gcc.dg/ipa/pr109318.c: Same.
* gcc.dg/ipa/pr96040.c: Use size_t instead of unsigned long.
* gcc.dg/torture/pr113126.c: Use vectors of same dimension.
* gcc.dg/tree-ssa/builtin-sprintf-9.c: Requires double64.
* gcc.dg/spellcheck-inttypes.c [avr]: Avoid include of inttypes.h.
* gcc.dg/analyzer/torture/pr104159.c [avr]: Skip.
* gcc.dg/torture/pr84682-2.c [avr]: Skip.
* gcc.dg/wtr-conversion-1.c [avr]: Remove avr selector since
long double is a 64-bit type by now.
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/torture/boxed-ptr-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/torture/pr102692.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr102714.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr108007.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr109318.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr96040.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/spellcheck-inttypes.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr113126.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr113895-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr115387-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr84682-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/wtr-conversion-1.c | 4 |
14 files changed, 25 insertions, 11 deletions
diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/boxed-ptr-1.c b/gcc/testsuite/gcc.dg/analyzer/torture/boxed-ptr-1.c index 5bc7151..e25d0c3 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/boxed-ptr-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/boxed-ptr-1.c @@ -1,4 +1,5 @@ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ +/* { dg-require-effective-target size24plus } */ #include <stdlib.h> #include "../analyzer-decls.h" diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr102692.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr102692.c index a6c6bc4..a1b3bfe 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/pr102692.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr102692.c @@ -15,7 +15,7 @@ make_lisp_ptr (void *ptr, int type) static _Bool TAGGEDP (struct lisp *a, unsigned tag) { - return ! (((unsigned) (long) a - tag) & 7); + return ! (((unsigned) (__INTPTR_TYPE__) a - tag) & 7); } static _Bool diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c b/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c index ad85d08..0c490bd 100644 --- a/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c +++ b/gcc/testsuite/gcc.dg/analyzer/torture/pr104159.c @@ -1,4 +1,5 @@ /* { dg-additional-options "-Wno-analyzer-use-of-uninitialized-value -Wno-psabi" } */ +/* { dg-skip-if "incompatible types" { "avr-*-*" } } */ typedef int __attribute__((__vector_size__(4))) T; typedef unsigned __attribute__((__vector_size__(4))) U; diff --git a/gcc/testsuite/gcc.dg/ipa/pr102714.c b/gcc/testsuite/gcc.dg/ipa/pr102714.c index 65dd86f..8ab77a6 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr102714.c +++ b/gcc/testsuite/gcc.dg/ipa/pr102714.c @@ -54,16 +54,16 @@ static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attr static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) struct xa_node *entry_to_node(void *ptr) { - return (void *)((unsigned long)ptr & ~2UL); + return (void *)((__UINTPTR_TYPE__)ptr & ~(__UINTPTR_TYPE__)2); } static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) bool radix_tree_is_internal_node(void *ptr) { - return ((unsigned long)ptr & 3UL) == + return ((__UINTPTR_TYPE__)ptr & 3UL) == 2UL; } -static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) void *xa_mk_internal(unsigned long v) +static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((no_instrument_function)) void *xa_mk_internal(__UINTPTR_TYPE__ v) { return (void *)((v << 2) | 2); } diff --git a/gcc/testsuite/gcc.dg/ipa/pr108007.c b/gcc/testsuite/gcc.dg/ipa/pr108007.c index 77fc959..5bd1c35 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr108007.c +++ b/gcc/testsuite/gcc.dg/ipa/pr108007.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-Os -fno-dce -fno-tree-dce -g" } */ +/* { dg-require-effective-target int32plus } */ /* This tests that when IPA-SRA removes a LHS of a call statement which, in the original source, is fed into a useless operation which however can trap when diff --git a/gcc/testsuite/gcc.dg/ipa/pr109318.c b/gcc/testsuite/gcc.dg/ipa/pr109318.c index c5d9e3d..68e9f62 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr109318.c +++ b/gcc/testsuite/gcc.dg/ipa/pr109318.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -fno-early-inlining" } */ +/* { dg-require-effective-target int32plus } */ #pragma pack(1) struct S { diff --git a/gcc/testsuite/gcc.dg/ipa/pr96040.c b/gcc/testsuite/gcc.dg/ipa/pr96040.c index af7e9c4..9c9b762 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr96040.c +++ b/gcc/testsuite/gcc.dg/ipa/pr96040.c @@ -3,8 +3,8 @@ int puts(const char *); -int snprintf(char *, unsigned long, const char *, ...); -unsigned long strspn(const char *, const char *); +int snprintf(char *, __SIZE_TYPE__, const char *, ...); +__SIZE_TYPE__ strspn(const char *, const char *); struct TValue { union { diff --git a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c index 24e0754..084a5cd 100644 --- a/gcc/testsuite/gcc.dg/spellcheck-inttypes.c +++ b/gcc/testsuite/gcc.dg/spellcheck-inttypes.c @@ -3,6 +3,13 @@ #ifdef _AIX #define _STD_TYPES_T #endif + +/* Prevent AVR-LibC from implicitly including inttypes.h. */ +#ifdef __AVR__ +#define __INTTYPES_H_ +#include <stdint.h> +#endif + #include <stdio.h> #include <stdint.h> /* Missing <inttypes.h>. */ diff --git a/gcc/testsuite/gcc.dg/torture/pr113126.c b/gcc/testsuite/gcc.dg/torture/pr113126.c index ffe2979..75d05e4 100644 --- a/gcc/testsuite/gcc.dg/torture/pr113126.c +++ b/gcc/testsuite/gcc.dg/torture/pr113126.c @@ -1,8 +1,8 @@ /* { dg-do compile } */ /* { dg-additional-options "-Wno-psabi" } */ -typedef float __attribute__((__vector_size__ (8))) F; -typedef double __attribute__((__vector_size__ (16))) G; +typedef float __attribute__((__vector_size__ (2 * sizeof(float)))) F; +typedef double __attribute__((__vector_size__ (2 * sizeof(double)))) G; F f; G g; diff --git a/gcc/testsuite/gcc.dg/torture/pr113895-1.c b/gcc/testsuite/gcc.dg/torture/pr113895-1.c index e96cb2f..7ad6823 100644 --- a/gcc/testsuite/gcc.dg/torture/pr113895-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr113895-1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target int32plus } */ int main_i; void transparent_crc(int); diff --git a/gcc/testsuite/gcc.dg/torture/pr115387-1.c b/gcc/testsuite/gcc.dg/torture/pr115387-1.c index d94e935..7ff3ced 100644 --- a/gcc/testsuite/gcc.dg/torture/pr115387-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr115387-1.c @@ -3,7 +3,7 @@ #define PRINTF_CHK 0x34 -typedef unsigned long uintptr_t; +typedef __UINTPTR_TYPE__ uintptr_t; struct __printf_buffer { char *write_ptr; diff --git a/gcc/testsuite/gcc.dg/torture/pr84682-2.c b/gcc/testsuite/gcc.dg/torture/pr84682-2.c index 5abda5f..f8d15c5 100644 --- a/gcc/testsuite/gcc.dg/torture/pr84682-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr84682-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "impossible register constraint" { "avr-*-*" } } */ int a; void b() { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c index b4a05bb..3be18c7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c @@ -1,5 +1,6 @@ /* PR tree-optimization/86274 - SEGFAULT when logging std::to_string(NAN) { dg-do compile } + { dg-require-effective-target double64 } { dg-skip-if "not IEEE float layout" { "pdp11-*-*" } } { dg-options "-O2 -Wall -fdump-tree-optimized" } */ diff --git a/gcc/testsuite/gcc.dg/wtr-conversion-1.c b/gcc/testsuite/gcc.dg/wtr-conversion-1.c index 9d2cd99..38e8d7d 100644 --- a/gcc/testsuite/gcc.dg/wtr-conversion-1.c +++ b/gcc/testsuite/gcc.dg/wtr-conversion-1.c @@ -28,8 +28,8 @@ testfunc1 () foo_f (cd); /* { dg-warning "as floating rather than complex" "prototype conversion warning" } */ foo_ld (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */ - foo_ld (f); /* { dg-warning "as 'float' rather than 'double'" "small double" { target { "avr-*-*" } } } */ - foo_ld (ld);/* { dg-warning "as 'float' rather than 'double'" "small long double" { target { "avr-*-*" } } } */ + foo_ld (f); + foo_ld (ld); foo_ld (cd);/* { dg-warning "as floating rather than complex" "prototype conversion warning" } */ foo_cd (i); /* { dg-warning "as complex rather than integer" "prototype conversion warning" } */ |