public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4778] testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
@ 2022-12-19 12:52 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2022-12-19 12:52 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ea37e96a37b50dad17b91d46edc518bbb9132d8e
commit r13-4778-gea37e96a37b50dad17b91d46edc518bbb9132d8e
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Dec 19 13:49:52 2022 +0100
testsuite: Fix up pr64536.c for LLP64 targets [PR108151]
The test casts a pointer to long, which is ok for ilp32 and lp64
targets but not for llp64 targets. Nothing reads the values later,
it is a link test, so all we care about is that it is the same
cast on s390x-linux where it used to fail before the PR64536 fix,
and that we don't warn about it.
2022-12-19 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108151
* gcc.dg/pr64536.c (bar): Use casts to __INTPTR_TYPE__ rather than
long when casting pointer to integral type.
Diff:
---
gcc/testsuite/gcc.dg/pr64536.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/pr64536.c b/gcc/testsuite/gcc.dg/pr64536.c
index f2728fbc938..bca2d4f0efe 100644
--- a/gcc/testsuite/gcc.dg/pr64536.c
+++ b/gcc/testsuite/gcc.dg/pr64536.c
@@ -41,7 +41,7 @@ bar (int x)
}
else
i = (long *) (h->q = *f);
- *c++ = (long) f;
+ *c++ = (__INTPTR_TYPE__) f;
e += 6;
}
else
@@ -55,7 +55,7 @@ bar (int x)
}
else
i = (long *) (h->q = *f);
- *c++ = (long) f;
+ *c++ = (__INTPTR_TYPE__) f;
e += 6;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-19 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 12:52 [gcc r13-4778] testsuite: Fix up pr64536.c for LLP64 targets [PR108151] Jakub Jelinek
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).