]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant)
authorJakub Jelinek <jakub@redhat.com>
Wed, 5 Jun 2019 12:18:23 +0000 (14:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 5 Jun 2019 12:18:23 +0000 (14:18 +0200)
Backported from mainline
2019-05-24  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/90585
* plugin/plugin-hsa.c (print_kernel_dispatch, run_kernel): Use PRIu64
macro instead of "lu".
(release_kernel_dispatch): Likewise.  Cast shadow->debug to uintptr_t
before casting to void *.

From-SVN: r271957

libgomp/ChangeLog
libgomp/plugin/plugin-hsa.c

index 597c55e31540322968e5e2c83b3142cb8cb62290..2bc3592198aa4d31c6a82dc93fc513cdfedffc0d 100644 (file)
@@ -1,3 +1,14 @@
+2019-06-05  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2019-05-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR libgomp/90585
+       * plugin/plugin-hsa.c (print_kernel_dispatch, run_kernel): Use PRIu64
+       macro instead of "lu".
+       (release_kernel_dispatch): Likewise.  Cast shadow->debug to uintptr_t
+       before casting to void *.
+
 2019-05-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR libgomp/90527
index a2b9bdbeb34ad350ab0aa9a3f973c0259ea3c4c8..e0bc87c9552fbdfeece150ba0ae622d57b3e7f47 100644 (file)
@@ -1154,8 +1154,9 @@ create_single_kernel_dispatch (struct kernel_info *kernel,
 static void
 release_kernel_dispatch (struct GOMP_hsa_kernel_dispatch *shadow)
 {
-  HSA_DEBUG ("Released kernel dispatch: %p has value: %lu (%p)\n", shadow,
-            shadow->debug, (void *) shadow->debug);
+  HSA_DEBUG ("Released kernel dispatch: %p has value: %" PRIu64 " (%p)\n",
+            shadow, shadow->debug,
+            (void *) (uintptr_t) shadow->debug);
 
   hsa_fns.hsa_memory_free_fn (shadow->kernarg_address);
 
@@ -1276,9 +1277,9 @@ print_kernel_dispatch (struct GOMP_hsa_kernel_dispatch *dispatch, unsigned inden
   indent_stream (stderr, indent);
   fprintf (stderr, "kernarg_address: %p\n", dispatch->kernarg_address);
   indent_stream (stderr, indent);
-  fprintf (stderr, "object: %lu\n", dispatch->object);
+  fprintf (stderr, "object: %" PRIu64 "\n", dispatch->object);
   indent_stream (stderr, indent);
-  fprintf (stderr, "signal: %lu\n", dispatch->signal);
+  fprintf (stderr, "signal: %" PRIu64 "\n", dispatch->signal);
   indent_stream (stderr, indent);
   fprintf (stderr, "private_segment_size: %u\n",
           dispatch->private_segment_size);
@@ -1286,7 +1287,7 @@ print_kernel_dispatch (struct GOMP_hsa_kernel_dispatch *dispatch, unsigned inden
   fprintf (stderr, "group_segment_size: %u\n",
           dispatch->group_segment_size);
   indent_stream (stderr, indent);
-  fprintf (stderr, "children dispatches: %lu\n",
+  fprintf (stderr, "children dispatches: %" PRIu64 "\n",
           dispatch->kernel_dispatch_count);
   indent_stream (stderr, indent);
   fprintf (stderr, "omp_num_threads: %u\n",
@@ -1594,7 +1595,7 @@ run_kernel (struct kernel_info *kernel, void *vars,
        hsa_signal_t child_s;
        child_s.handle = shadow->children_dispatches[i]->signal;
 
-       HSA_DEBUG ("Waiting for children completion signal: %lu\n",
+       HSA_DEBUG ("Waiting for children completion signal: %" PRIu64 "\n",
                   shadow->children_dispatches[i]->signal);
        hsa_fns.hsa_signal_load_acquire_fn (child_s);
       }