[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / stack-clash-protection-02.c
blobeb236d0aeac6199b379a6a7892320a4862a75874
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
6 int foo(int c) {
7 int r;
8 __asm__("ag %%r15, %0"
10 : "rm"(c)
11 : "r15");
12 return r;