public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] Address cast to pointer from integer of different size in 'libgomp/target.c:gomp_target_rev'
@ 2023-02-14 22:40 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-02-14 22:40 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cd377354c5faa326bdfa5f10e4193c1d1a686801
commit cd377354c5faa326bdfa5f10e4193c1d1a686801
Author: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue Feb 14 23:34:45 2023 +0100
Address cast to pointer from integer of different size in 'libgomp/target.c:gomp_target_rev'
For example, for '-m32' multilib of x86_64-pc-linux-gnu:
[...]/libgomp/target.c: In function ‘gomp_target_rev’:
[...]/libgomp/target.c:3699:33: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
3699 | (void *) devaddrs[i],
| ^
Fix-up for recent og12 commit 229b705862c1d7f9634f72272b77c22970baf821
"openmp: Add support for the 'present' modifier".
libgomp/
* target.c (gomp_target_rev): Address cast to pointer from integer
of different size.
Diff:
---
libgomp/ChangeLog.omp | 5 +++++
libgomp/target.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index 484367d9975..67065f59922 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,8 @@
+2023-02-14 Thomas Schwinge <thomas@codesourcery.com>
+
+ * target.c (gomp_target_rev): Address cast to pointer from integer
+ of different size.
+
2023-02-09 Kwok Cheung Yeung <kcy@codesourcery.com>
* target.c (gomp_to_device_kind_p): Add map kinds with 'present'
diff --git a/libgomp/target.c b/libgomp/target.c
index 426383a451b..6edfc9214e4 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -3696,12 +3696,12 @@ gomp_target_rev (uint64_t fn_ptr, uint64_t mapnum, uint64_t devaddrs_ptr,
#ifdef HAVE_INTTYPES_H
gomp_fatal ("present clause: no corresponding data on "
"parent device at %p with size %"PRIu64,
- (void *) devaddrs[i],
+ (void *) (uintptr_t) devaddrs[i],
(uint64_t) sizes[i]);
#else
gomp_fatal ("present clause: no corresponding data on "
"parent device at %p with size %lu",
- (void *) devaddrs[i],
+ (void *) (uintptr_t) devaddrs[i],
(unsigned long) sizes[i]);
#endif
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-14 22:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 22:40 [gcc/devel/omp/gcc-12] Address cast to pointer from integer of different size in 'libgomp/target.c:gomp_target_rev' Thomas Schwinge
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).