« first day  last day (15 days later) » 

22:14
@NateEldredge My intended question was not how to make a particular target work, but rather whether there is any way a transpiler can receive any benefit from optimizations that the target compiler would perform more broadly than allowed in the source language, or whether the only way for those optimizations to be done at all would be for the transpiler to do them itself.
 
2 hours later…
23:54
Well, at that level of generality, I think there are only very general and rather tautological answers. You can look for language constructs that block the undesired optimizations while preserving, as much as possible, the desired ones; such as a dummy side effect. (In the case at hand, we haven't found one that works ideally in practice.) Or you can restrict yourself to target compilers that allow you to block them (like gcc and clang with -fno-finite-loops).
Or you can target a language dialect whose semantics are more to your liking, e.g. C89 or C99 which don't have the forward progress rule.

« first day  last day (15 days later) »