public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1076] testsuite/52641: Fix more of implicit int=32 assumption fallout.
@ 2023-05-22 18:21 Georg-Johann Lay
  0 siblings, 0 replies; only message in thread
From: Georg-Johann Lay @ 2023-05-22 18:21 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:42d6b7d58caf7858704d93ce2f7a8cdf8a071e44

commit r14-1076-g42d6b7d58caf7858704d93ce2f7a8cdf8a071e44
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Mon May 22 20:14:51 2023 +0200

    testsuite/52641: Fix more of implicit int=32 assumption fallout.
    
    gcc/testsuite/
            PR testsuite/52641
            * gcc.c-torture/compile/pr108892.c: Require int32.
            * gcc.c-torture/compile/pr98199.c: Require int32plus.
            * gcc.dg/analyzer/call-summaries-pr107072.c: Same.
            * gcc.dg/analyzer/null-deref-pr105755.c: Same.
            * gcc.dg/tree-ssa/pr102232.c: Same.
            * gcc.dg/tree-ssa/pr105860.c: Same.
            * gcc.dg/tree-ssa/pr96730.c: Same.
            * gcc.dg/tree-ssa/pr96779-disabled.c: Same.
            * gcc.dg/tree-ssa/pr96779.c: Same.
            * gcc.dg/tree-ssa/pr98513.c: Same.
            * gcc.dg/tree-ssa/ssa-sink-18.c
            * gcc.dg/analyzer/coreutils-cksum-pr108664.c: Require int32plus,
            size24plus.
            * gcc.dg/analyzer/doom-s_sound-pr108867.c: Require size32plus.
            * gcc.dg/analyzer/malloc-CWE-590-examples.c: Same.
            * gcc.dg/debug/btf/btf-bitfields-4.c: Same.
            * gcc.dg/tree-ssa/pr93435.c: Same.
            * gcc.dg/analyzer/null-deref-pr102671-1.c: Require ptr_eq_long:
            * gcc.dg/analyzer/null-deref-pr102671-2.c: Same.
            * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
            Same.
            * gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
            Same.
            * gcc.dg/tree-ssa/pr103345.c: Use uint32_t.
            * gcc.dg/tree-ssa/ssa-ccp-41.c [sizeof(int)==2]: Same.
            * gcc.dg/tree-ssa/pr109031-1.c: Use uint16_t, uint32_t.
            * gcc.dg/tree-ssa/pr109031-2.c: Same.
            * gcc.dg/Warray-bounds-49.c (dg-warning): Discriminate int != short.
            * gcc.dg/Warray-bounds-52.c (dg-warning): Discriminate avr.
            * gcc.dg/Warray-bounds-33.c: Skip target avr.
            * gcc.dg/analyzer/fd-access-mode-target-headers.c: Same.
            * gcc.dg/analyzer/flex-with-call-summaries.c: Same.
            * gcc.dg/analyzer/isatty-1.c: Same.
            * gcc.dg/analyzer/pipe-glibc.c: Same.

Diff:
---
 gcc/testsuite/gcc.c-torture/compile/pr108892.c     |  2 ++
 gcc/testsuite/gcc.c-torture/compile/pr98199.c      |  1 +
 gcc/testsuite/gcc.dg/Warray-bounds-33.c            |  1 +
 gcc/testsuite/gcc.dg/Warray-bounds-49.c            | 30 ++++++++++++++--------
 gcc/testsuite/gcc.dg/Warray-bounds-52.c            |  6 ++---
 .../gcc.dg/analyzer/call-summaries-pr107072.c      |  1 +
 .../gcc.dg/analyzer/coreutils-cksum-pr108664.c     |  3 +++
 .../gcc.dg/analyzer/doom-s_sound-pr108867.c        |  1 +
 .../analyzer/fd-access-mode-target-headers.c       |  1 +
 .../gcc.dg/analyzer/flex-with-call-summaries.c     |  1 +
 gcc/testsuite/gcc.dg/analyzer/isatty-1.c           |  1 +
 .../gcc.dg/analyzer/malloc-CWE-590-examples.c      |  1 +
 .../gcc.dg/analyzer/null-deref-pr102671-1.c        |  1 +
 .../gcc.dg/analyzer/null-deref-pr102671-2.c        |  1 +
 .../gcc.dg/analyzer/null-deref-pr105755.c          |  1 +
 ...-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c |  1 +
 ...ull-deref-pr108251-smp_fetch_ssl_fc_has_early.c |  2 ++
 gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c         |  2 ++
 gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c   |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr102232.c           |  3 ++-
 gcc/testsuite/gcc.dg/tree-ssa/pr103345.c           |  2 +-
 gcc/testsuite/gcc.dg/tree-ssa/pr105860.c           |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c         |  8 +++---
 gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c         |  8 +++---
 gcc/testsuite/gcc.dg/tree-ssa/pr93435.c            |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr96730.c            |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c   |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr96779.c            |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr98513.c            |  1 +
 gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c         |  6 ++++-
 gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c        |  1 +
 31 files changed, 68 insertions(+), 24 deletions(-)

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr108892.c b/gcc/testsuite/gcc.c-torture/compile/pr108892.c
index d7fecd54ecf..fb0a258cdba 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr108892.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr108892.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target int32 } */
+
 typedef char __attribute__((__vector_size__ (64))) U;
 typedef int __attribute__((__vector_size__ (64))) V;
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr98199.c b/gcc/testsuite/gcc.c-torture/compile/pr98199.c
index b5c8d204f0e..6605d38788c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr98199.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr98199.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/98199 */
+/* { dg-require-effective-target int32plus } */
 
 struct A { long a; short d; int c, f, e, g; };
 struct B { int a, i; short j; struct A k; signed : 20; int e, g; } __attribute__((packed));
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-33.c b/gcc/testsuite/gcc.dg/Warray-bounds-33.c
index 28f14b4722c..13efabe33b6 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-33.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-33.c
@@ -2,6 +2,7 @@
    an object of incomplete type
    { dg-do compile }
    { dg-options "-O2 -Wall" }  */
+/* { dg-skip-if "acessing data memory with program memory address" { "avr-*-*" } } */
 
 struct S
 {
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-49.c b/gcc/testsuite/gcc.dg/Warray-bounds-49.c
index f271dd526b8..9335f1507e8 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-49.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-49.c
@@ -17,7 +17,8 @@ void test_a0 (void)
   // The first three elements fit in the tail padding.
   a0.a2[0] = 0; a0.a2[1] = 1; a0.a2[2] = 2;
 
-  a0.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" }
+  a0.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -27,7 +28,8 @@ void test_a1 (void)
 {
   a1.a2[0] = 0; a1.a2[1] = 1; a1.a2[2] = 2;
 
-  a1.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" }
+  a1.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -37,7 +39,8 @@ void test_a2 (void)
 {
   a2.a2[0] = 0; a2.a2[1] = 1; a2.a2[2] = 2;
 
-  a2.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" }
+  a2.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -47,7 +50,8 @@ void test_a3 (void)
 {
   a3.a2[0] = 0; a3.a2[1] = 1; a3.a2[2] = 2;
 
-  a3.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" }
+  a3.a2[3] = 3;     // { dg-warning "array subscript 3 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 3 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -57,7 +61,8 @@ void test_a4 (void)
 {
   a4.a2[0] = 0; a4.a2[1] = 1; a4.a2[2] = 2; a4.a2[3] = 3;
 
-  a4.a2[4] = 4;     // { dg-warning "array subscript 4 is above array bounds of 'short int\\\[]'" }
+  a4.a2[4] = 4;     // { dg-warning "array subscript 4 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 4 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -67,7 +72,8 @@ void test_a5 (void)
 {
   a5.a2[0] = 0; a5.a2[1] = 1; a5.a2[2] = 2; a5.a2[3] = 3; a5.a2[4] = 4;
 
-  a5.a2[5] = 5;     // { dg-warning "array subscript 5 is above array bounds of 'short int\\\[]'" }
+  a5.a2[5] = 5;     // { dg-warning "array subscript 5 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 5 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -78,7 +84,8 @@ void test_a6 (void)
   a6.a2[0] = 0; a6.a2[1] = 1; a6.a2[2] = 2; a6.a2[3] = 3; a6.a2[4] = 4;
   a6.a2[5] = 5;
 
-  a6.a2[6] = 6;     // { dg-warning "array subscript 6 is above array bounds of 'short int\\\[]'" }
+  a6.a2[6] = 6;     // { dg-warning "array subscript 6 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 6 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -89,7 +96,8 @@ void test_a7 (void)
   a7.a2[0] = 0; a7.a2[1] = 1; a7.a2[2] = 2; a7.a2[3] = 3; a7.a2[4] = 4;
   a7.a2[5] = 5; a7.a2[5] = 5; a7.a2[6] = 6;
 
-  a7.a2[7] = 7;     // { dg-warning "array subscript 7 is above array bounds of 'short int\\\[]'" }
+  a7.a2[7] = 7;     // { dg-warning "array subscript 7 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 7 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -100,7 +108,8 @@ void test_a8 (void)
   a8.a2[0] = 0; a8.a2[1] = 1; a8.a2[2] = 2; a8.a2[3] = 3; a8.a2[4] = 4;
   a8.a2[5] = 5; a8.a2[5] = 5; a8.a2[6] = 6; a8.a2[7] = 7;
 
-  a8.a2[8] = 8;     // { dg-warning "array subscript 8 is above array bounds of 'short int\\\[]'" }
+  a8.a2[8] = 8;     // { dg-warning "array subscript 8 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 8 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
 
 
@@ -111,5 +120,6 @@ void test_a9 (void)
   a8.a2[0] = 8; a8.a2[1] = 7; a8.a2[2] = 6; a8.a2[3] = 5; a8.a2[4] = 4;
   a8.a2[5] = 3; a8.a2[5] = 2; a8.a2[6] = 1; a8.a2[7] = 0;
 
-  a8.a2[9] = 8;     // { dg-warning "array subscript 9 is above array bounds of 'short int\\\[]'" }
+  a8.a2[9] = 8;     // { dg-warning "array subscript 9 is above array bounds of 'short int\\\[]'" "" { target { ! short_eq_int } } }
+  // { dg-warning "array subscript 9 is above array bounds of 'int\\\[]'" "" { target { short_eq_int } } .-1 }
 }
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-52.c b/gcc/testsuite/gcc.dg/Warray-bounds-52.c
index 69dc15ace2d..d3aab3cbe94 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-52.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-52.c
@@ -59,9 +59,9 @@ void ptr_idx_cst (void)
   T (-1, (int[]){ 1 });         // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" }
   T ( 0, (int[]){ 1 });
   T (+1, (int[]){ 1 });         // { dg-warning "array subscript 1 is outside array bounds of 'int\\\[1]'" }
-  T (INT_MIN, (int[]){ 1 });    // { dg-warning "array subscript -\[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { xfail ilp32 } }
-  T (INT_MAX, (int[]){ 1 });    // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "not-ilp32" { target { ! ilp32 } } }
-                                // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" "ilp32" { target ilp32 } .-1 }
+  T (INT_MIN, (int[]){ 1 });    // { dg-warning "array subscript -\[0-9\]+ is outside array bounds of 'int\\\[1]'" "lp64" { xfail { ilp32 || avr-*-* } } }
+  T (INT_MAX, (int[]){ 1 });    // { dg-warning "array subscript \[0-9\]+ is outside array bounds of 'int\\\[1]'" "not-ilp32" { target { ! { ilp32 || avr-*-* } } } }
+                                // { dg-warning "array subscript -1 is outside array bounds of 'int\\\[1]'" "ilp32-or-avr" { target { ilp32 || avr-*-* } } .-1 }
   T (SIZE_MAX, (int[]){ 1 });   // { dg-warning "array subscript -?\[0-9\]+ is outside array bounds of 'int\\\[1]'" }
 }
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c b/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c
index 1e689b3860c..6e583d0228f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c
+++ b/gcc/testsuite/gcc.dg/analyzer/call-summaries-pr107072.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 /* { dg-additional-options "-fanalyzer-call-summaries --param analyzer-min-snodes-for-call-summary=0" } */
 
 /* There need to be at least two calls to a function for the
diff --git a/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c b/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c
index 27eef8369e2..62698f3d148 100644
--- a/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c
+++ b/gcc/testsuite/gcc.dg/analyzer/coreutils-cksum-pr108664.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size24plus } */
+
 /* Reduced from coreutils's cksum.c: cksum_slice8 */
 
 typedef long unsigned int size_t;
diff --git a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c
index ebbfed2982a..ae58f03d3b3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c
+++ b/gcc/testsuite/gcc.dg/analyzer/doom-s_sound-pr108867.c
@@ -1,6 +1,7 @@
 /* Reduced from Doom's linuxdoom-1.10/s_sound.c, which is GPLv2 or later.  */
 
 /* { dg-additional-options "-fno-analyzer-call-summaries -Wno-analyzer-too-complex" } */
+/* { dg-require-effective-target size32plus } */
 
 typedef struct _IO_FILE FILE;
 extern FILE* stderr;
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
index cf273b217d1..b57b9fa2279 100644
--- a/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-access-mode-target-headers.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "" { powerpc*-*-aix* || newlib } } */
+/* { dg-skip-if "" { avr-*-* } } */
 
 #include <sys/stat.h>
 #include <fcntl.h>
diff --git a/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c b/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c
index 79f2f8e1879..45edacf0e53 100644
--- a/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c
+++ b/gcc/testsuite/gcc.dg/analyzer/flex-with-call-summaries.c
@@ -2,6 +2,7 @@
    script.  */
 
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-skip-if "" { "avr-*-*" } } */
 /* { dg-additional-options "-fanalyzer-call-summaries" } */
 /* { dg-additional-options "-Wno-analyzer-too-complex" } */
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/isatty-1.c b/gcc/testsuite/gcc.dg/analyzer/isatty-1.c
index 389d2cdf3f1..3bb12c0db25 100644
--- a/gcc/testsuite/gcc.dg/analyzer/isatty-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/isatty-1.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "" { powerpc*-*-aix* } } */
+/* { dg-skip-if "" { "avr-*-*" } } */
 
 #include <errno.h>
 #include "analyzer-decls.h"
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c b/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c
index 036f8889a92..9434f2df75f 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-CWE-590-examples.c
@@ -1,4 +1,5 @@
 /* { dg-additional-options "-Wno-free-nonheap-object" } */
+/* { dg-require-effective-target size32plus } */
 
 /* Examples adapted from https://cwe.mitre.org/data/definitions/590.html
    which states "Copyright © 2006–2022, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation."
diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c
index 12a0a48d658..3fe061bdbd8 100644
--- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target ptr_eq_long } */
 /* { dg-additional-options "-O2 -Wno-shift-count-overflow" } */
 
 struct lisp;
diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c
index 5108182a6c3..298e4839b98 100644
--- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target ptr_eq_long } */
 /* { dg-additional-options "-O2 -Wno-shift-count-overflow" } */
 
 struct lisp;
diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c
index f6bf3830908..2b0ba292e00 100644
--- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c
+++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr105755.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
 /* { dg-additional-options "-Wno-analyzer-too-complex -O2" } */
 
 typedef long int ptrdiff_t;
diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
index 2a9c715c32c..cb46827ab65 100644
--- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c
@@ -1,5 +1,6 @@
 /* Reduced from haproxy's src/ssl_sample.c  */
 
+/* { dg-require-effective-target ptr_eq_long } */
 /* { dg-additional-options "-O2" } */
 
 union sample_value {
diff --git a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
index d83af19788c..fbacb6ca2d3 100644
--- a/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
+++ b/gcc/testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early.c
@@ -1,5 +1,7 @@
 /* Reduced from haproxy's src/ssl_sample.c  */
 
+/* { dg-require-effective-target ptr_eq_long } */
+
 union sample_value {
   long long int sint;
   /* [...snip...]  */
diff --git a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
index 5a794c8c690..60558a870b9 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
@@ -1,5 +1,7 @@
 /* Example of pipe usage from glibc manual.  */
 
+/* { dg-skip-if "" { "avr-*-*" } } */
+
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c
index af91845726f..c00c8b3d87f 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-4.c
@@ -10,6 +10,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O0 -gbtf -dA" } */
+/* { dg-require-effective-target size32plus } */
 
 /* Struct with 3 members and no bitfield (kind_flag not set).  */
 /* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c
index 62bca6922ab..59ec52ad199 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102232.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/102232 */
 /* { dg-do run } */
 /* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 int __attribute__ ((noipa)) foo (int a, int b)
 {
@@ -49,4 +50,4 @@ main (void)
 
 /* Verify that multiplication and division has been removed.  */
 /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
-/* { dg-final { scan-tree-dump-not " / " "optimized" } } */
\ No newline at end of file
+/* { dg-final { scan-tree-dump-not " / " "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
index dc8810ab5af..87b237bdb53 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103345.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-bswap-details" } */
 
-typedef unsigned int uint32_t;
+typedef __UINT32_TYPE__ uint32_t;
 typedef unsigned char uint8_t;
 
 uint32_t load_le_32_or(const uint8_t *ptr)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c
index 77bcb4a6739..bbfaa45d967 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O1" } */
+/* { dg-require-effective-target int32plus } */
 
 struct S1  {
         unsigned int _0;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c
index 84e1a08be29..9e85f108f79 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-1.c
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
 unsigned char uc;
-unsigned short us;
+__UINT16_TYPE__ us;
 
 void testuc() {
   unsigned int g = 0;
@@ -18,9 +18,9 @@ void testuc() {
 }
 
 void testus() {
-  unsigned int g = 0;
-  unsigned int *p1 = &g;
-  unsigned short *p2 = &us;
+  __UINT32_TYPE__ g = 0;
+  __UINT32_TYPE__ *p1 = &g;
+  __UINT16_TYPE__ *p2 = &us;
 
   do {
     (*p1)++;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c
index 6f28b3b5ed8..51f4b7a74ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr109031-2.c
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fwrapv" } */
 signed char sc;
-signed short ss;
+__INT16_TYPE__ ss;
 
 void testsc() {
   unsigned int g = 0;
@@ -18,9 +18,9 @@ void testsc() {
 }
 
 void testss() {
-  unsigned int g = 0;
-  unsigned int *p1 = &g;
-  signed short *p2 = &ss;
+  __UINT32_TYPE__ g = 0;
+  __UINT32_TYPE__ *p1 = &g;
+  __INT16_TYPE__ *p2 = &ss;
 
   do {
     (*p1)++;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c b/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c
index cb8e7495b15..ca2e091ed25 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr93435.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target size32plus } */
 
 typedef signed char int8_T;
 typedef int int32_T;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c
index 39a06846529..8eb2006d0a9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96730.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O1" } */
+/* { dg-require-effective-target int32plus } */
 
 struct a {
   int b;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
index 205133d8e0c..968620582af 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/96779 */
 /* { dg-do run } */
 /* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
+/* { dg-require-effective-target int32plus } */
 
 #include <stdbool.h>
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
index 0d46e8eeb15..03618bf81d2 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96779.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/96779 */
 /* { dg-do run } */
 /* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-require-effective-target int32plus } */
 
 #include <stdbool.h>
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c
index c15d6bd708e..859d7ac4ac1 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr98513.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -fgimple" } */
+/* { dg-require-effective-target int32plus } */
 
 __attribute__((noipa))
 void __GIMPLE (ssa,startwith("evrp"))
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c
index d2b054e9355..e0a0b6b8e00 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-41.c
@@ -1,11 +1,15 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
 
+#if __SIZEOF_INT__ == 2
+#define int __INT32_TYPE__
+#endif
+
 int foo(int x)
 {
     int p = x & 24;
     int r = 1 << p; 
-    return r & (1<<17);
+    return r & ((int)1<<17);
 }
 
 /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c
index 9ac0fc6e4de..fd6c8677212 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-18.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-sink-stats" } */
+/* { dg-require-effective-target int32plus } */
 
 #include <stdint.h>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-22 18:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 18:21 [gcc r14-1076] testsuite/52641: Fix more of implicit int=32 assumption fallout Georg-Johann Lay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).