Avoid warning: '"cc" clobber ignored' with PGI on RUNNING_ON_VALGRIND?

118 views Asked by At

We get warnings of the type

"/var/lib/buildbot/slaves/athor-linux-pgi-c-nompi/petsc/src/sys/objects/pinit.c
         ", line 1493: warning: "cc" clobber ignored
   if (!(RUNNING_ON_VALGRIND)) {

When compiling with the latest community version of the NVIDIA/PGI C compiler.

We like to compile with all warning flags on so don't want to turn off warning flags if possible.

RUNNING_ON_VALGRIND is defined in valgrind.h to eventually become a use of

#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
                     "roll $3,  %%edi ; roll $13, %%edi\n\t"      \
                     "roll $29, %%edi ; roll $19, %%edi\n\t"

#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
        _zzq_default, _zzq_request,                               \
        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
  __extension__                                                   \
  ({volatile unsigned int _zzq_args[6];                           \
    volatile unsigned int _zzq_result;                            \
    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
                     /* %EDX = client_request ( %EAX ) */         \
                     "xchgl %%ebx,%%ebx"                          \
                     : "=d" (_zzq_result)                         \
                     : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
                     : "cc", "memory"                             \
                    );                                            \
    _zzq_result;                                                  \
  })

Is there any way to avoid the clobber message?

0

There are 0 answers