blob: dd97013ae6749729519e81f0326407d7c4875905 [file] [log] [blame]
Huihui Zhangfd842d32020-05-13 17:55:08 -07001// 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
Ehud Katz03a95262020-04-16 13:26:23 +03003// PR45476
4
5// This test used to get into an infinite loop,
6// which, in turn, caused clang to never finish execution.
7
8struct s3 {
9 char a, b, c;
10};
11
12_Atomic struct s3 a;
13
14extern "C" void foo() {
Huihui Zhangfd842d32020-05-13 17:55:08 -070015 // LIBCALL-LABEL: @foo
16 // LIBCALL: call void @__atomic_store
17 // NATIVE-LABEL: @foo
18 // NATIVE: store atomic i32
Ehud Katz03a95262020-04-16 13:26:23 +030019
20 a = s3{1, 2, 3};
21}
22