Hi!

Finally got to debug why most libgomp offloading tests fail on
powerpc64le-linux when configured for NVPTX offloading.

The problem is -funsigned-char by default, so
if (cuda_lib_inited != -1)
was always true.  Fixed thusly, bootstrapped/regtested on x86_64-linux
and powerpc64le-linux, committed to trunk.

2017-04-13  Jakub Jelinek  <ja...@redhat.com>

        * plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
        instead of char.

--- libgomp/plugin/plugin-nvptx.c.jj    2017-02-04 03:15:32.000000000 -0500
+++ libgomp/plugin/plugin-nvptx.c       2017-04-13 08:24:46.456531331 -0400
@@ -106,7 +106,7 @@ struct cuda_lib_s {
 
 /* -1 if init_cuda_lib has not been called yet, false
    if it has been and failed, true if it has been and succeeded.  */
-static char cuda_lib_inited = -1;
+static signed char cuda_lib_inited = -1;
 
 /* Dynamically load the CUDA runtime library and initialize function
    pointers, return false if unsuccessful, true if successful.  */


        Jakub

Reply via email to