Hello,
well, that really depends a little bit of that source code. Maybe you just did a mistake like
if (ui == -1) ....
and if the variable is unsigned, the compiler may have optimized the whole block away? In such a case, the compiler would have you warned about that (with a message). I suggest that you check the compiler messages around the code in question (maybe you simply did an error in the source code?).
If this is not the reason, you may switch off optimizations, and here are some options you could try:
-Onu
-Onf
-O0
-Ona
-Onb
-Ont
If the code is around a variable, you can enforce disabling optimizations making the variable volatile (but this is really only something as a last resort: typically the compiler is right optimizing code).
BK