From: Jakub Jelinek Date: Fri, 30 Aug 2019 12:45:31 +0000 (+0200) Subject: backport: re PR libgomp/90585 (libgomp hsa plugin ftbfs in the x32 multilib variant) X-Git-Tag: releases/gcc-7.5.0~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac6b16bb3b0aec371d80cc98b4296ad918f65b82;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: r275158 --- diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 4b2d8ff8d490..90a436c9c904 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,6 +1,14 @@ 2019-08-30 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-06-11 Jakub Jelinek PR target/90811 diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index 9cc243d66bf9..3af3c9732c18 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -1175,8 +1175,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); @@ -1297,9 +1298,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); @@ -1307,7 +1308,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", @@ -1615,7 +1616,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); }