1fd842d36SHuihui Zhang // RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s 2fd842d36SHuihui Zhang // RUN: %clang_cc1 -triple armv8-eabi -emit-llvm %s -o - | FileCheck -check-prefix=NATIVE %s 303a9526fSEhud Katz // PR45476 403a9526fSEhud Katz 503a9526fSEhud Katz // This test used to get into an infinite loop, 603a9526fSEhud Katz // which, in turn, caused clang to never finish execution. 703a9526fSEhud Katz 803a9526fSEhud Katz struct s3 { 903a9526fSEhud Katz char a, b, c; 1003a9526fSEhud Katz }; 1103a9526fSEhud Katz 1203a9526fSEhud Katz _Atomic struct s3 a; 1303a9526fSEhud Katz foo()1403a9526fSEhud Katzextern "C" void foo() { 15fd842d36SHuihui Zhang // LIBCALL-LABEL: @foo 16fd842d36SHuihui Zhang // LIBCALL: call void @__atomic_store 17fd842d36SHuihui Zhang // NATIVE-LABEL: @foo 18*8043d5a9SJames Y Knight // NATIVE: store atomic i32 {{.*}} seq_cst, align 4 1903a9526fSEhud Katz 2003a9526fSEhud Katz a = s3{1, 2, 3}; 2103a9526fSEhud Katz } 22