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 5bc7151a79870849f926fde35ef95a9ba4dfd0ed..e25d0c31ea5580ef7115cd609937b8f3574c0067 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 a6c6bc478967c4026dd077e535dec81d7e5e702a..a1b3bfed047af59f037d5d622ef00946757375d9 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 ad85d084b3968d607b9f299f63f76dfd1f540a67..0c490bd39f2f943fa5493b92b01d3da76e1e2421 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 65dd86f5c1540c5f142f7627fceaa5259f94c264..8ab77a61d75bd24d1069f2909a73f9a4fec4779e 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 77fc95975cfd4080b71052fd5d1c92373f0171d5..5bd1c350963510549eccf4dc150f30d5facadd73 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 c5d9e3d12c7b1c637a37d1f5f8e709495e9a7426..68e9f62eb37d7742d6435b7c22b361a05cae5d90 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 af7e9c4ed941849f906474cd0ad601dcad40035f..9c9b76269a6c8117813ced6ee836a6f406248bd2 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 24e075433fc9a0ae8987c90e2e6c5517388e2bcc..084a5cd43140031ecd8b16bb9de624dba6f35b70 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 ffe29799d13a76a7e1675ed394b6b851f6c69ad1..75d05e4797248dc1e34b2d284b5c69706568279f 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 e96cb2f33e16cf3a3e449a0a0db931f87bb8288d..7ad682338d7a5cf8eb66fe2971fde87a8c194eb8 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 d94e935fadec115740ba8e831fdde2bebc50ec60..7ff3ced07bf898cd53b55617d659774e8af32aa1 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 5abda5fd136c3f3e3d48e3e9a4fe606208edffc5..f8d15c5e6a39644d12c91db0f7502124dc59ce5d 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 b4a05bbd38af738fda1a02f5f624ebf5babaf15e..3be18c7b5dcdef5ab01cde2b966d121128eb6ac2 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 9d2cd9999398f029da19b66c9062c9c05567368d..38e8d7d2085b16c7311ecefec3c8a9e82457144d 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" } */