| 1 |
// RUN: %clang -target s390x-linux-gnu -fstack-clash-protection -### %s 2>&1 | FileCheck %s -check-prefix=SystemZ |
| 2 |
// SystemZ: "-fstack-clash-protection" |
| 3 |
// RUN: %clang -target s390x-linux-gnu -fstack-clash-protection -S -emit-llvm -o %t.ll %s 2>&1 | FileCheck %s -check-prefix=SystemZ-warn |
| 4 |
// SystemZ-warn: warning: unable to protect inline asm that clobbers stack pointer against stack clash |
| 5 |
|
| 6 |
int foo(int c) { |
| 7 |
int r; |
| 8 |
__asm__("ag %%r15, %0" |
| 9 |
: |
| 10 |
: "rm"(c) |
| 11 |
: "r15"); |
| 12 |
return r; |
| 13 |
} |