You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all:
The following code snippet is for atomic function test. when using clang(https://github.com/llvm/llvm-project llvm12.0.1), this test passed. but it will failed when using classic-llvm-clang(https://github.com/flang-compiler/classic-flang-llvm-project tag flang_20211215_12x)
If we compile the code by classic-llvm-clang, this test will stucked and running forever. clang test.c -o test ./test
#include <sys/types.h>
int main(void) {
long n = 0;
if (!__sync_bool_compare_and_swap(&n, 0, 1))
return 1;
if (__sync_fetch_and_add(&n, 1) != 1)
return 1;
if (n != 2)
return 1;
__sync_synchronize();;
return 0;
}
The text was updated successfully, but these errors were encountered:
Hi all:
The following code snippet is for atomic function test. when using clang(https://github.com/llvm/llvm-project llvm12.0.1), this test passed. but it will failed when using classic-llvm-clang(https://github.com/flang-compiler/classic-flang-llvm-project tag flang_20211215_12x)
If we compile the code by classic-llvm-clang, this test will stucked and running forever.
clang test.c -o test
./test
The text was updated successfully, but these errors were encountered: