Compile settings were exactly the same, I just changed the code.
What if you used printf() which is far more equivalent to an ostream in terms of its formatting capabilities? And are you linking dynamically or statically?
Code:
//try
//{
if (a) do { f( b); } while(1);
else do { f(!b); } while(1);
//}