unused variable 'temp_val'

Jonathan,
       It appears we have one more instance of dead code in
runtime/src/kmp_atomic.c which produces numerous warnings of the
form...

/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:2266:1:
warning: unused variable 'temp_val' [-Wunused-variable]
ATOMIC_CMPXCHG_CPT_REV( fixed1, div_cpt_rev, kmp_int8, 8, /,
KMP_ARCH_X86 ) // __kmpc_atomic_fixed1_div_cpt_rev
^
/sw/src/fink.build/llvm37-3.7.0-100/llvm-3.7.0.src/projects/openmp/runtime/src/kmp_atomic.c:2260:34:
note: expanded from macro 'ATOMIC_CMPXCHG_CPT_REV'
        TYPE KMP_ATOMIC_VOLATILE temp_val; \
                                 ^
Isn't the line...

        TYPE KMP_ATOMIC_VOLATILE temp_val; \

dead code in the macro definition....

#define ATOMIC_CMPXCHG_CPT_REV(TYPE_ID,OP_ID,TYPE,BITS,OP,GOMP_FLAG) \
ATOMIC_BEGIN_CPT(TYPE_ID,OP_ID,TYPE,TYPE) \
    TYPE new_value; \
        TYPE KMP_ATOMIC_VOLATILE temp_val; \
    OP_GOMP_CRITICAL_CPT_REV(OP,GOMP_FLAG) \
    OP_CMPXCHG_CPT_REV(TYPE,BITS,OP) \
}

      Jack

That depends on wheter or not GOMP_FLAG is true or false.
GOMP_FLAG=1 means use a critical section for compatibility with gcc 4.2-4.5 (4.6?) ia32, and that makes temp_val dead code.
GOMP_FLAG=0 gets max performance, and that is why it was coded that way.

The issue should probably revisited as I believe ia32 libgomp has switched away from critical sections is some cases (thereby breaking libgomp backward compatibility).
We put the issue on the back burner until libgomp 4.5 was irrelevant, but it's about time.
Gcc for Intel64 uses inlined cmpxchg or locked add wherever possible & avoids critical sections calls.

-bb