From: Jakub Jelinek Date: Wed, 5 Jun 2019 12:18:23 +0000 (+0200) Subject: backport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant) X-Git-Tag: releases/gcc-9.2.0~274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaaa6abfeb4076124f1078542f2acc973a34fdee;p=thirdparty%2Fgcc.git backport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant) Backported from mainline 2019-05-24 Jakub Jelinek 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 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 597c55e31540..2bc3592198aa 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,14 @@ +2019-06-05 Jakub Jelinek + + Backported from mainline + 2019-05-24 Jakub Jelinek + + 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 PR libgomp/90527 diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index a2b9bdbeb34a..e0bc87c9552f 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -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); }