[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / aarch64-fixed-register-global.c
blob7b1fb118fcdf7125602500da48ca2ecc7faf6fd1
1 // Check that -ffixed register handled for globals.
2 // Regression test for #76426
3 // RUN: %clang --target=aarch64-none-gnu -ffixed-x15 -### %s 2>&1 | FileCheck %s
4 // CHECK-NOT: fatal error: error in backend: Invalid register name "x15".
5 register int i1 __asm__("x15");
7 int foo() {
8 return i1;
10 int main() {
11 return foo();