Let\'s pretend my program contains a specific construct the C++ Standard states to be unspecified behavior. This basically means the implementation has to do something reasonabl
That's the purpose of specifying it as undefined...it means there is no telling what will happen, either on different or even the same platform (with repeated tests).
Many such behaviours are implemented differently when compiled with different optimization levels or with or without debug mode.
Unspecified and undefined behavior are not guaranteed to be consistent between separate runs of an already compiled program. That alone already makes the notion of consistency between separate compiles totally meaningless.
Also, it is probably worth adding that undefined behavior can manifest itself at compilation stage by preventing the program from compiling at all.