I am curious about the liberties that a compiler has when optimizing. Let\'s limit this question to GCC and C/C++ (any version, any flavour of standard):
Anything that is Undefined Behavior according to the standard can change its behavior depending on optimization level (or moon-phase, for that matter).