Compiler error looking for a workaround

:(

when using code like this:

void global nvopencc_test( int *pi_flags )
{
int i_idx_x;

int rgi_flags_table[ 6 ] = { 1, 2, 4, 8, 16, 32 };

i_idx_x = threadIdx.x;

if( pi_flags[ 0 ] & rgi_flags_table[ i_idx_x ] )
{
	pi_flags[ 0 ] = 1;
}

}

i always get ( with 2.1 )

1>### Assertion failure at line 727 of …/…/be/cg/NVISA/exp_loadstore.cxx:
1>### Compiler Error in file C:\Users\Steiner\AppData\Local\Temp/tmpxft_00000cd0_00000000-9_clock.cpp3.i during Code_Expansion phase:
1>### lda but not addr used?

i cant seem to read the rgi_flags_table, no matter what. anyone knows a workaround ? :)

A long shot: Using the volatile keyword on some of my variables have helped me in the past, when I had a compiler bug. It disables some optimizations which could be causing unstability.