* [COMMITTED] Fix some testcases after my computed goto patch
@ 2021-09-29 8:06 apinski
0 siblings, 0 replies; only message in thread
From: apinski @ 2021-09-29 8:06 UTC (permalink / raw)
To: gcc-patches; +Cc: Andrew Pinski
From: Andrew Pinski <apinski@marvell.com>
For some reason I did not see these failures in my testing.
Sorry about that. Anyways this fixes the testcases by
adding a cast to __INTPTR_TYPE__ and then a cast to void*.
Committed after testing them on x86_64-linux-gnu.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/920826-1.c: Fix computed goto.
* gcc.c-torture/compile/pr27863.c: Likewise.
* gcc.c-torture/compile/pr70190.c: Likewise.
* gcc.dg/torture/pr89135.c: Likewise.
* gcc.dg/torture/pr90071.c: Likewise.
* gcc.dg/vect/bb-slp-pr97709.c: Likewise.
---
gcc/testsuite/gcc.c-torture/compile/920826-1.c | 2 +-
gcc/testsuite/gcc.c-torture/compile/pr27863.c | 2 +-
gcc/testsuite/gcc.c-torture/compile/pr70190.c | 2 +-
gcc/testsuite/gcc.dg/torture/pr89135.c | 2 +-
gcc/testsuite/gcc.dg/torture/pr90071.c | 2 +-
gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/testsuite/gcc.c-torture/compile/920826-1.c b/gcc/testsuite/gcc.c-torture/compile/920826-1.c
index c2d8843..2a175456 100644
--- a/gcc/testsuite/gcc.c-torture/compile/920826-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/920826-1.c
@@ -1,3 +1,3 @@
/* { dg-require-effective-target indirect_jumps } */
-f(int*x){goto*(char)*x;}
+f(int*x){goto*(void*)(__INTPTR_TYPE__)(char)*x;}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27863.c b/gcc/testsuite/gcc.c-torture/compile/pr27863.c
index 926312e4..9dc1ab8 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr27863.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr27863.c
@@ -27,5 +27,5 @@ _loc66:;
*++esp=(long)&&_loc119;
_loc119:;
SetTermStruc:
- goto *(*esp--);
+ goto *(void*)(__INTPTR_TYPE__)(*esp--);
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr70190.c b/gcc/testsuite/gcc.c-torture/compile/pr70190.c
index d3d209a..6c57b50 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr70190.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr70190.c
@@ -8,7 +8,7 @@ fn1 ()
static char a[] = "foo";
static void *b[] = { &&l1, &&l2 };
goto *(b[1]);
- l1: goto *(a[0]);
+ l1: goto *(void*)(__INTPTR_TYPE__)(a[0]);
l2: return 0;
}
diff --git a/gcc/testsuite/gcc.dg/torture/pr89135.c b/gcc/testsuite/gcc.dg/torture/pr89135.c
index 278303f..4cf0533 100644
--- a/gcc/testsuite/gcc.dg/torture/pr89135.c
+++ b/gcc/testsuite/gcc.dg/torture/pr89135.c
@@ -28,7 +28,7 @@ h:
g = foo ();
*o = g;
if (c)
- goto *d;
+ goto *(void*)d;
}
}
goto *i;
diff --git a/gcc/testsuite/gcc.dg/torture/pr90071.c b/gcc/testsuite/gcc.dg/torture/pr90071.c
index 702c143..1c4099c 100644
--- a/gcc/testsuite/gcc.dg/torture/pr90071.c
+++ b/gcc/testsuite/gcc.dg/torture/pr90071.c
@@ -21,6 +21,6 @@ h: ++e;
goto i;
}
f:
- goto *({ d || e < 0 || e >= 2; });
+ goto *(void*)(__INTPTR_TYPE__)({ d || e < 0 || e >= 2; });
&e;
}
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c
index 672807f..d0f3d05 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr97709.c
@@ -12,7 +12,7 @@ e()
void *f[] = {&&g, &&h, &&i, &&j};
int d, c;
j:
- goto *a;
+ goto *(void*)(__INTPTR_TYPE__)a;
g:
d = 0;
h:
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-29 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 8:06 [COMMITTED] Fix some testcases after my computed goto patch apinski
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).