Huihui Zhang | fd842d3 | 2020-05-13 17:55:08 -0700 | [diff] [blame^] | 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 |
Ehud Katz | 03a9526 | 2020-04-16 13:26:23 +0300 | [diff] [blame] | 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 | |
| 14 | extern "C" void foo() { |
Huihui Zhang | fd842d3 | 2020-05-13 17:55:08 -0700 | [diff] [blame^] | 15 | // LIBCALL-LABEL: @foo |
| 16 | // LIBCALL: call void @__atomic_store |
| 17 | // NATIVE-LABEL: @foo |
| 18 | // NATIVE: store atomic i32 |
Ehud Katz | 03a9526 | 2020-04-16 13:26:23 +0300 | [diff] [blame] | 19 | |
| 20 | a = s3{1, 2, 3}; |
| 21 | } |
| 22 | |