Hi,
I have a kernel as follows:
if (condition is true):# is always true
    x=array[0,0];
    if (cond2 is true):
        x[i]++;
    global_x[i]=x[i];

This gives me negative values in global_x. But when i declare x outside the condition and copy x to global_x outside the if condition universally, i get correct results. This made sense if my condition was not always true. But since condition 1 is always true, can someone please explain why this happens.

thanks
Aseem