Strange bug on fermi

I have code that looks like

[codebox]if( type == 3 )

{

//Same Implementation

}

if( type == 4 )

{

//Same implementation

}[/codebox]

that runs ok but the opposite:

[codebox]if( type == 4 )

{

//Same Implementation

}

if( type == 3 )

{

//Same implementation

}[/codebox]

gets a unspecified launch error.

I even get a launch failure if

[codebox]if( type == 4 )

{

//Empty

}

if( type == 3 )

{

//Same implementation

}[/codebox]

and type is never == 3.

WTF! No problem in emudebug.

Using fermi 480, 3.0 sdk, 197.41.

I’m really fed up with these kinds of bugs.

And no, I can not isolate the problem code.

I can’t really do anything without a repro case.

If you can’t give code, there’s not much we can help with.
The only clue I might look at first is if you accidentally have any __syncthreads() inside the tests. You may be seeing a sync deadlock, which (because of the unspecified behavior when you diverge syncthreads()) could act flaky.