On Thu, Aug 24, 2017 at 10:03 PM, Benjamin Barenblat <bba...@mit.edu> wrote: > […] I’ve determined that the problematic optimization on both platforms > is -fcode-hoisting […]. While this doesn’t eliminate either a bug in > MLton or in GCC, it does provide a workaround for this package, namely > > export DEB_CFLAGS_MAINT_APPEND := -fno-code-hoisting > > However, the correct solution is still to fix whatever compiler is > miscompiling here. I’m going to do a bit more digging to see if I can > figure out whether it’s MLton or GCC.
This is going to be difficult to track down. MLton’s C codegen basically uses C as a platform-independent assembly, and the generated code is one giant function with gotos everywhere. I’m thus going to halt my investigations and just disable code hoisting. I’ll continue monitoring this as development continues on the compilers involved.