public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite,applied] PR52641: Fix more implicit int=32 fallout.
@ 2023-05-30 20:09 Georg-Johann Lay
  0 siblings, 0 replies; only message in thread
From: Georg-Johann Lay @ 2023-05-30 20:09 UTC (permalink / raw)
  To: gcc-patches

Committed to undo implicit assumptions.

Johann

testsuite/52641: Fix more of implicit int=32 assumption fallout.

gcc/testsuite/
	PR testsuite/52641
	* gcc.dg/torture/pr107451.c: Require int32plus.
	* gcc.dg/torture/pr108574-3.c: Use __INT32_TYPE__ instead of int.
	* gcc.dg/torture/pr109940.c: Use __INTPTR_TYPE__ instead of long.
	* gcc.dg/torture/pr95248.c: Require size24plus.
	* gcc.dg/torture/pr95295-3.c: Use var_* with at least 32 bits int.
	* gcc.dg/torture/pr98640.c: Cast to __INT32_TYPE__ instead of int.
	* gcc.dg/tree-ssa/pr103771.c: Use int with at least 32 bits.


diff --git a/gcc/testsuite/gcc.dg/torture/pr107451.c 
b/gcc/testsuite/gcc.dg/torture/pr107451.c
index a17574c6896..fee010ac40a 100644
--- a/gcc/testsuite/gcc.dg/torture/pr107451.c
+++ b/gcc/testsuite/gcc.dg/torture/pr107451.c
@@ -1,4 +1,5 @@
  /* { dg-do run } */
+/* { dg-require-effective-target int32plus } */
  /* { dg-additional-options "-ftree-vectorize -fno-vect-cost-model" } */
  /* { dg-additional-options "-mavx2" { target avx2_runtime } } */

diff --git a/gcc/testsuite/gcc.dg/torture/pr108574-3.c 
b/gcc/testsuite/gcc.dg/torture/pr108574-3.c
index b4d5dae9f80..b5c85d1261a 100644
--- a/gcc/testsuite/gcc.dg/torture/pr108574-3.c
+++ b/gcc/testsuite/gcc.dg/torture/pr108574-3.c
@@ -1,6 +1,6 @@
  /* { dg-do run } */

-int a = 3557301289, d;
+__INT32_TYPE__ a = 3557301289, d;
  signed char b, f;
  unsigned short c = 241;
  short e, g;
diff --git a/gcc/testsuite/gcc.dg/torture/pr109940.c 
b/gcc/testsuite/gcc.dg/torture/pr109940.c
index 23364708e86..55082d0e312 100644
--- a/gcc/testsuite/gcc.dg/torture/pr109940.c
+++ b/gcc/testsuite/gcc.dg/torture/pr109940.c
@@ -11,7 +11,7 @@ e(int d, int f) {
      return 1;
    int g = d / 2;
    for (int h = 0; h < g; h++)
-    if (f == (long int)b > b[h])
+    if (f == (__INTPTR_TYPE__)b > b[h])
        c(&b[h]);
    e(g, f);
    e(g, f);
diff --git a/gcc/testsuite/gcc.dg/torture/pr95248.c 
b/gcc/testsuite/gcc.dg/torture/pr95248.c
index f0efcc12b51..e39eb22d04b 100644
--- a/gcc/testsuite/gcc.dg/torture/pr95248.c
+++ b/gcc/testsuite/gcc.dg/torture/pr95248.c
@@ -1,5 +1,6 @@
  /* { dg-do run } */
  /* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size24plus } */

  int var_2 = -2013646301;
  int var_3 = -1126567434;
diff --git a/gcc/testsuite/gcc.dg/torture/pr95295-3.c 
b/gcc/testsuite/gcc.dg/torture/pr95295-3.c
index a506af9a63f..f723020c0b3 100644
--- a/gcc/testsuite/gcc.dg/torture/pr95295-3.c
+++ b/gcc/testsuite/gcc.dg/torture/pr95295-3.c
@@ -1,7 +1,11 @@
  /* { dg-do compile } */

  extern short var_15, var_20;
+#if __SIZEOF_INT__ >= 4
  extern int var_18, var_21, var_23;
+#else
+extern __INT32_TYPE__ var_18, var_21, var_23;
+#endif
  extern _Bool arr_2[];
  extern long arr_3[];
  void test()
diff --git a/gcc/testsuite/gcc.dg/torture/pr98640.c 
b/gcc/testsuite/gcc.dg/torture/pr98640.c
index b187781d614..426be66ec80 100644
--- a/gcc/testsuite/gcc.dg/torture/pr98640.c
+++ b/gcc/testsuite/gcc.dg/torture/pr98640.c
@@ -10,7 +10,7 @@ uint64_t var_83 = 10966786425750692026ULL;
  void test()
  {
    var_14 = var_0 + (_Bool)7;
-  var_83 = 1 + (int)var_0; // 1 + 888395530
+  var_83 = 1 + (int32_t)var_0; // 1 + 888395530
  }

  int main()
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr103771.c 
b/gcc/testsuite/gcc.dg/tree-ssa/pr103771.c
index 8faa45a8222..8061e2df79e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr103771.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr103771.c
@@ -4,6 +4,10 @@

  typedef unsigned char uint8_t;

+#if __SIZEOF_INT__ < 4
+#define int __INT32_TYPE__
+#endif
+
  static uint8_t x264_clip_uint8 (int x)
  {
    return x & (~255) ? (-x) >> 31 : x;

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

only message in thread, other threads:[~2023-05-30 20:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 20:09 [testsuite,applied] PR52641: Fix more implicit int=32 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).