• Jon Olav Hauglid's avatar
    Bug#13030056 62533: UNITTEST/MYSYS/MY_ATOMIC-T.C DOES NOT · 0c9caf82
    Jon Olav Hauglid authored
                          COMPILE ON MACOSX LION
    
    The problem was that on optimized builds, the wrong code was generated
    for my_atomic_add64 if a variable argument was optimized away as a
    constant.
    
    This patch fixes the problem by making the variable volatile.
    
    Another workaround is to specify architecture explicitly using e.g.
    CFLAGS/CXXFLAGS= "-m64".
    
    No test case added.
    0c9caf82
my_atomic-t.c 4.74 KB