1 // RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s
2 // RUN: %clang_cc1 -triple armv8-eabi -emit-llvm %s -o - | FileCheck -check-prefix=NATIVE %s
3 // PR45476
4
5 // This test used to get into an infinite loop,
6 // which, in turn, caused clang to never finish execution.
7
8 struct s3 {
9 char a, b, c;
10 };
11
12 _Atomic struct s3 a;
13
foo()14 extern "C" void foo() {
15 // LIBCALL-LABEL: @foo
16 // LIBCALL: call void @__atomic_store
17 // NATIVE-LABEL: @foo
18 // NATIVE: store atomic i32 {{.*}} seq_cst, align 4
19
20 a = s3{1, 2, 3};
21 }
22