@deroko. Have you tried to disable compiler optimizations selectively? (I've been into a similar situation

) Most of the compilers I'm aware of support this feature via a "#pragma". Intel compiler provides a lot of fine-grained options for enabling/disabling specific optimizing transformation.
Hope that helps!