Skip to content
  • Simon Marlow's avatar
    Fix capi_value on Windows · 782b5bf7
    Simon Marlow authored
    This appears to be a bug in the gcc that we're currently using.
    
    Compiling this, with -O:
    
    const int i;
    int f(void) {return i;}
    
    results in this assembly:
    
            pushl   %ebp
            movl    %esp, %ebp
            movl    $0, %eax   <--- the $0 is wrong, should be _i
            leave
            ret
    
    Turning off -O makes it work.
    
    Maybe time to update our mingw gcc bundles?
    782b5bf7