clang/test/Driver/aarch64-fixed-register-global.c
raw| 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"); |
| 6 | |
| 7 | int foo() { |
| 8 | return i1; |
| 9 | } |
| 10 | int main() { |
| 11 | return foo(); |
| 12 | } |