diff --git a/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c b/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c
index 0c5311ec675d5cc034e82cf47c829771d79572b3..dc28e2c99c615af626a3ee75cfcb9d538160ec60 100644
--- a/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/attr-complex-method-2.c
@@ -8,4 +8,5 @@ void do_div (_Complex double *a, _Complex double *b)
   *a = *b / (4.0 - 5.0fi);
 }
 
-/* { dg-final { scan-tree-dump "__(?:gnu_)?divdc3" "optimized" } } */
+/* { dg-final { scan-tree-dump "__(?:gnu_)?divdc3" "optimized" { target { ! { avr-*-* } } } } } */
+/* { dg-final { scan-tree-dump "__(?:gnu_)?divsc3" "optimized" { target { avr-*-* } } } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c
index b67b6090dc3851483e47db622586e7b47c8f86dd..a53fe2e35f38ca589d4bf26fcb317610baadbf17 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-1.c
@@ -3,7 +3,7 @@
    This testcase checks that warn_compare_distinct_pointer_types is enabled by
    default.  */
 
-typedef int __u32;
+typedef __INT32_TYPE__ __u32;
 
 struct xdp_md
 {
@@ -13,8 +13,8 @@ struct xdp_md
 
 int xdp_context (struct xdp_md *xdp)
 {
-  void *data = (void *)(long)xdp->data;
-  __u32 *metadata = (void *)(long)xdp->data_meta;
+  void *data = (void *)(__INTPTR_TYPE__)xdp->data;
+  __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta;
   __u32 ret;
 
   if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c
index d4223c25c949903fe06c6b18deb61eee761e7e5e..d5a2afa163c7f03a0d63d9f5fac82436a144a83c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-2.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-Wcompare-distinct-pointer-types" } */
 
-typedef int __u32;
+typedef __INT32_TYPE__ __u32;
 
 struct xdp_md
 {
@@ -11,8 +11,8 @@ struct xdp_md
 
 int xdp_context (struct xdp_md *xdp)
 {
-  void *data = (void *)(long)xdp->data;
-  __u32 *metadata = (void *)(long)xdp->data_meta;
+  void *data = (void *)(__INTPTR_TYPE__)xdp->data;
+  __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta;
   __u32 ret;
 
   if (metadata + 1 > data) /* { dg-warning "comparison of distinct pointer types" } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c b/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c
index 73c9b251824d4b8e819ea2895018a91333f3c0eb..13876eab337b528bacb835ac4e2ce5d77124668b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr106537-3.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O0 -Wno-compare-distinct-pointer-types" } */
 
-typedef int __u32;
+typedef __INT32_TYPE__ __u32;
 
 struct xdp_md
 {
@@ -11,8 +11,8 @@ struct xdp_md
 
 int xdp_context (struct xdp_md *xdp)
 {
-  void *data = (void *)(long)xdp->data;
-  __u32 *metadata = (void *)(long)xdp->data_meta;
+  void *data = (void *)(__INTPTR_TYPE__)xdp->data;
+  __u32 *metadata = (void *)(__INTPTR_TYPE__)xdp->data_meta;
   __u32 ret;
 
   if (metadata + 1 > data) /* There shouldn't be a warning here.  */
diff --git a/gcc/testsuite/gcc.c-torture/execute/20230630-3.c b/gcc/testsuite/gcc.c-torture/execute/20230630-3.c
index fc106c97b5b5ce9f7ddca44a9932b19ea74eea5c..735cb9b2edef7b3f48b32ccd8a204f9782e35b44 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20230630-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20230630-3.c
@@ -1,5 +1,5 @@
 struct S {
-  int i : 24;
+  __INT32_TYPE__ i : 24;
   char c1 : 1;
   char c2 : 1;
   char c3 : 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20230630-4.c b/gcc/testsuite/gcc.c-torture/execute/20230630-4.c
index df33c18a8cd77dacc0bd5166476273c14576d5ae..e300cd42e0a7477967a910ad70e18d56ce379a5f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20230630-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20230630-4.c
@@ -5,7 +5,7 @@
 #endif
 
 struct S {
-  int i : 24;
+  __INT32_TYPE__ i : 24;
   char c1 : 1;
   char c2 : 1;
   char c3 : 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr109938.c b/gcc/testsuite/gcc.c-torture/execute/pr109938.c
index a65d13b305dc4eac354ff907b2ac87039294b6df..668d4ca19a93296c2031f9555c3bf9e561a5f3f2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr109938.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr109938.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 /* PR tree-opt/109938 */
 
 #include "../../gcc.dg/tree-ssa/pr109938.c"
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr109986.c b/gcc/testsuite/gcc.c-torture/execute/pr109986.c
index 00ee9888539142cb7cf496d6ec5bb4ed68ca0410..c4c96452801e86e5d8a359ac2465231cd753e121 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr109986.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr109986.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 /* PR middle-end/109986 */
 
 #include "../../gcc.dg/tree-ssa/pr109986.c"
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-13.c b/gcc/testsuite/gcc.dg/builtin-bswap-13.c
index 6dc4c15b45021414f58d5d60460b58b27529d599..4f5bc9735f907c3a0a964b313fee0c210a5e2a17 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-13.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-13.c
@@ -1,6 +1,10 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
 
+#if __SIZEOF_INT__ < 4
+#define int __INT32_TYPE__
+#endif
+
 int test_s32_0_1(int x) { return __builtin_bswap32(x) & 1; }
 int test_s32_0_2(int x) { return __builtin_bswap32(x) & 2; }
 int test_s32_0_240(int x) { return __builtin_bswap32(x) & 240; }
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-14.c b/gcc/testsuite/gcc.dg/builtin-bswap-14.c
index 62711d8ef64d4964d901e5d8b780f93c7329008f..0abf4666ef1dad2ffafc6c0ca765efbbf6d20fa6 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-14.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-14.c
@@ -5,11 +5,11 @@ extern void abort (void);
 
 
 __attribute__ ((noinline, noclone))
-static int rt32 (int x, int y, int z) {
+static __INT32_TYPE__ rt32 (__INT32_TYPE__ x, int y, __INT32_TYPE__ z) {
   return (__builtin_bswap32(x) >> y) & z;
 }
 #define TEST32(X,Y,Z) if(((__builtin_bswap32(X)>>Y)&Z)!=rt32(X,Y,Z)) abort()
-void test32(int x)
+void test32(__INT32_TYPE__ x)
 {
   TEST32(x,0,1);
   TEST32(x,0,255);
diff --git a/gcc/testsuite/gcc.dg/c23-constexpr-9.c b/gcc/testsuite/gcc.dg/c23-constexpr-9.c
index 137058376e8563b480c3364bb39e338d4511f94a..8dadb18725cca6eb1e543f2e0e3efed4caf8e398 100644
--- a/gcc/testsuite/gcc.dg/c23-constexpr-9.c
+++ b/gcc/testsuite/gcc.dg/c23-constexpr-9.c
@@ -3,6 +3,7 @@
 /* { dg-options "-std=c23 -pedantic-errors" } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target inff } */
+/* { dg-require-effective-target large_double } */
 
 /* A conversion from signaling NaN to quiet NaN in a different format or type
    is not valid for constexpr.  */
diff --git a/gcc/testsuite/gcc.dg/c23-nullptr-1.c b/gcc/testsuite/gcc.dg/c23-nullptr-1.c
index a1b9dea25215d36519dfc6922ac0ea7e2e513db2..00ca7bd362bc1712ff82a4b5149eaed2691e0c2d 100644
--- a/gcc/testsuite/gcc.dg/c23-nullptr-1.c
+++ b/gcc/testsuite/gcc.dg/c23-nullptr-1.c
@@ -2,6 +2,7 @@
 /* { dg-do run } */
 // { dg-require-effective-target thread_fence }
 /* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */
+/* { dg-xfail-if "__atomic not supported" { "avr-*-*" } } */
 
 #include <stdarg.h>
 
diff --git a/gcc/testsuite/gcc.dg/fold-ior-4.c b/gcc/testsuite/gcc.dg/fold-ior-4.c
index 8f7213eb6c948c154cc47a6c79e78a6f8f4b8f95..17a2a4dc4190ffae189c9d608474bba0d34014f0 100644
--- a/gcc/testsuite/gcc.dg/fold-ior-4.c
+++ b/gcc/testsuite/gcc.dg/fold-ior-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 unsigned int test_ior(unsigned char i)
 {
diff --git a/gcc/testsuite/gcc.dg/fold-ior-5.c b/gcc/testsuite/gcc.dg/fold-ior-5.c
index 8de56976da9d3d15832edc2b74ba639fe5229c5e..8352fdd93939cb72a01e9a2e155b9fe21473c8a4 100644
--- a/gcc/testsuite/gcc.dg/fold-ior-5.c
+++ b/gcc/testsuite/gcc.dg/fold-ior-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 unsigned int test_ior(unsigned char i)
 {
diff --git a/gcc/testsuite/gcc.dg/fold-parity-5.c b/gcc/testsuite/gcc.dg/fold-parity-5.c
index 69d3a6a54ca7b39e63e8bfb1434bcab3501d2d40..e30cd2f68e43a37903ae050e5d7a9e25090e900f 100644
--- a/gcc/testsuite/gcc.dg/fold-parity-5.c
+++ b/gcc/testsuite/gcc.dg/fold-parity-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 int test_and4(unsigned int a)
 {
diff --git a/gcc/testsuite/gcc.dg/fold-popcount-5.c b/gcc/testsuite/gcc.dg/fold-popcount-5.c
index 943726f090229042c938d80e2cf131daf229dd47..4963a4d02a549b58292e08833ad7ecffe2b9b039 100644
--- a/gcc/testsuite/gcc.dg/fold-popcount-5.c
+++ b/gcc/testsuite/gcc.dg/fold-popcount-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 int test_and4(unsigned int a)
 {
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-10.c b/gcc/testsuite/gcc.dg/loop-unswitch-10.c
index 395167ee6f837dec7da7cd548788b76d094847c2..20f5d87ea28976253985b48e6ed756a2f116ef44 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-10.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-10.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized" } */
+/* { dg-require-effective-target size32plus } */
 
 int
 __attribute__((noipa))
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-11.c b/gcc/testsuite/gcc.dg/loop-unswitch-11.c
index 422a94227b25334219d0c55881286ebee6d482e2..e9441316d0d35085e6d022a4118242aec4f292e1 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-11.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-11.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized" } */
+/* { dg-require-effective-target int32 } */
 
 int
 foo(double *a, double *b, double *c, double *d, double *r, int size, int order)
diff --git a/gcc/testsuite/gcc.dg/loop-unswitch-14.c b/gcc/testsuite/gcc.dg/loop-unswitch-14.c
index d9d31680cb82081bbe52ebc48dfe63482d8d9230..e1225f6890f4a4c543c02421542d1282d385fbff 100644
--- a/gcc/testsuite/gcc.dg/loop-unswitch-14.c
+++ b/gcc/testsuite/gcc.dg/loop-unswitch-14.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-optimized --param=max-unswitch-insns=1000" } */
+/* { dg-require-effective-target size32plus } */
 
 int
 __attribute__((noipa))
diff --git a/gcc/testsuite/gcc.dg/pr101836.c b/gcc/testsuite/gcc.dg/pr101836.c
index 096196d9b7f2aa817ab81270c02bcd1079fbcc14..75349a83e1231e812f914e442fb4bcdbf11363a5 100644
--- a/gcc/testsuite/gcc.dg/pr101836.c
+++ b/gcc/testsuite/gcc.dg/pr101836.c
@@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff(
     struct trailing_array_3 *trailing_0,
     struct trailing_array_4 *trailing_flex)
 {
-    expect(__builtin_object_size(normal->c, 1), 16);
-    expect(__builtin_object_size(trailing_1->c, 1), 4);
+    expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__);
+    expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__);
     expect(__builtin_object_size(trailing_0->c, 1), 0);
     expect(__builtin_object_size(trailing_flex->c, 1), -1);
 }
diff --git a/gcc/testsuite/gcc.dg/pr101836_1.c b/gcc/testsuite/gcc.dg/pr101836_1.c
index e2931ce1012e9d7f17a587916904bdcfa726951f..19e63205a6c2c740928d7160ce1c49da00a3c445 100644
--- a/gcc/testsuite/gcc.dg/pr101836_1.c
+++ b/gcc/testsuite/gcc.dg/pr101836_1.c
@@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff(
     struct trailing_array_3 *trailing_0,
     struct trailing_array_4 *trailing_flex)
 {
-    expect(__builtin_object_size(normal->c, 1), 16);
-    expect(__builtin_object_size(trailing_1->c, 1), 4);
+    expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__);
+    expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__);
     expect(__builtin_object_size(trailing_0->c, 1), 0);
     expect(__builtin_object_size(trailing_flex->c, 1), -1);
 }
diff --git a/gcc/testsuite/gcc.dg/pr101836_2.c b/gcc/testsuite/gcc.dg/pr101836_2.c
index 78974187721ff74a3ee6700195bdaabd7a9ec254..09079e6c0232010f28001a90fbd46f273352766f 100644
--- a/gcc/testsuite/gcc.dg/pr101836_2.c
+++ b/gcc/testsuite/gcc.dg/pr101836_2.c
@@ -46,8 +46,8 @@ void __attribute__((__noinline__)) stuff(
     struct trailing_array_3 *trailing_0,
     struct trailing_array_4 *trailing_flex)
 {
-    expect(__builtin_object_size(normal->c, 1), 16);
-    expect(__builtin_object_size(trailing_1->c, 1), 4);
+    expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__);
+    expect(__builtin_object_size(trailing_1->c, 1), __SIZEOF_INT__);
     expect(__builtin_object_size(trailing_0->c, 1), -1);
     expect(__builtin_object_size(trailing_flex->c, 1), -1);
 }
diff --git a/gcc/testsuite/gcc.dg/pr101836_3.c b/gcc/testsuite/gcc.dg/pr101836_3.c
index 0e69388e81fb3864f6d8e22f091126446d5a1bee..63f50f75797181232ffde0d3b9b01c625d28c4a7 100644
--- a/gcc/testsuite/gcc.dg/pr101836_3.c
+++ b/gcc/testsuite/gcc.dg/pr101836_3.c
@@ -46,7 +46,7 @@ void __attribute__((__noinline__)) stuff(
     struct trailing_array_3 *trailing_0,
     struct trailing_array_4 *trailing_flex)
 {
-    expect(__builtin_object_size(normal->c, 1), 16);
+    expect(__builtin_object_size(normal->c, 1), 4 * __SIZEOF_INT__);
     expect(__builtin_object_size(trailing_1->c, 1), -1);
     expect(__builtin_object_size(trailing_0->c, 1), -1);
     expect(__builtin_object_size(trailing_flex->c, 1), -1);