It looks like nvcc compiler misinterprets a bitfield member in if() statements.
The structure with bit fields:
struct EdgeData
{
uint32_t m_S:1;
uint32_t m_NE:31;
};
The CUDA kernel code:
EdgeData * ped = …
if( ped->m_S ) // Picks up incorrect branch, regardless of the value of m_S.
Alternative CUDA kernel code
EdgeData * ped = …
const uint32_t S = ped->m_S;
if( S ) // Now picks up the correct branch.
How do I file a bug for that?