summaryrefslogtreecommitdiff
path: root/libgomp/oacc-parallel.c
diff options
context:
space:
mode:
authorKai Tietz <ktietz@redhat.com>2015-03-25 16:05:02 +0100
committerKai Tietz <ktietz@gcc.gnu.org>2015-03-25 16:05:02 +0100
commit01c0b3b0769bd4206d456f1e0efa51b7a126a664 (patch)
tree32f64e21dd3368fee112baede09275f2dc53bbf6 /libgomp/oacc-parallel.c
parent40916d50216c898dd38bdb6c09f151c364233970 (diff)
downloadgcc-01c0b3b0769bd4206d456f1e0efa51b7a126a664.tar.gz
re PR libgomp/64972 (Build failure in libgomp for i686-w64-mingw32 target after latest merge from gomp-4_0-branch)
PR libgomp/64972 * oacc-parallel.c (GOACC_parallel): Use PRIu64 if available. (GOACC_data_start): Likewise. * target.c (gomp_map_vars): Likewise. From-SVN: r221665
Diffstat (limited to 'libgomp/oacc-parallel.c')
-rw-r--r--libgomp/oacc-parallel.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/libgomp/oacc-parallel.c b/libgomp/oacc-parallel.c
index a3007428a86..0c74f547a24 100644
--- a/libgomp/oacc-parallel.c
+++ b/libgomp/oacc-parallel.c
@@ -31,6 +31,9 @@
#include "libgomp_g.h"
#include "gomp-constants.h"
#include "oacc-int.h"
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h> /* For PRIu64. */
+#endif
#include <string.h>
#include <stdarg.h>
#include <assert.h>
@@ -99,9 +102,15 @@ GOACC_parallel (int device, void (*fn) (void *),
gomp_fatal ("num_workers (%d) different from one is not yet supported",
num_workers);
- gomp_debug (0, "%s: mapnum=%zd, hostaddrs=%p, sizes=%p, kinds=%p, async=%d\n",
- __FUNCTION__, mapnum, hostaddrs, sizes, kinds, async);
-
+#ifdef HAVE_INTTYPES_H
+ gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p, kinds=%p, "
+ "async = %d\n",
+ __FUNCTION__, (uint64_t) mapnum, hostaddrs, sizes, kinds, async);
+#else
+ gomp_debug (0, "%s: mapnum=%lu, hostaddrs=%p, sizes=%p, kinds=%p, async=%d\n",
+ __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds,
+ async);
+#endif
select_acc_device (device);
thr = goacc_thread ();
@@ -178,8 +187,13 @@ GOACC_data_start (int device, size_t mapnum,
bool host_fallback = device == GOMP_DEVICE_HOST_FALLBACK;
struct target_mem_desc *tgt;
- gomp_debug (0, "%s: mapnum=%zd, hostaddrs=%p, sizes=%p, kinds=%p\n",
- __FUNCTION__, mapnum, hostaddrs, sizes, kinds);
+#ifdef HAVE_INTTYPES_H
+ gomp_debug (0, "%s: mapnum=%"PRIu64", hostaddrs=%p, size=%p, kinds=%p\n",
+ __FUNCTION__, (uint64_t) mapnum, hostaddrs, sizes, kinds);
+#else
+ gomp_debug (0, "%s: mapnum=%lu, hostaddrs=%p, sizes=%p, kinds=%p\n",
+ __FUNCTION__, (unsigned long) mapnum, hostaddrs, sizes, kinds);
+#endif
select_acc_device (device);