brintos

brintos / llvm-project-archived public Read only

0
0
Text · 758 B · 25c7aa2 Raw
24 lines · c
1/// Check that -ffixed register handled for globals.2/// Regression test for #76426, #1097783// REQUIRES: aarch64-registered-target4 5// RUN: %clang -c --target=aarch64-none-gnu -ffixed-x15 %s -o /dev/null 2>&1 | count 06 7// RUN: not %clang -c --target=aarch64-none-gnu %s -o /dev/null 2>&1 | \8// RUN:   FileCheck %s --check-prefix=ERR_INVREG9// ERR_INVREG: error: register 'x15' unsuitable for global register variables on this target10 11// RUN: not %clang -c --target=aarch64-none-gnu -ffixed-x15 -DTYPE=short %s -o /dev/null 2>&1 | \12// RUN:   FileCheck %s --check-prefix=ERR_SIZE13// ERR_SIZE: error: size of register 'x15' does not match variable size14 15#ifndef TYPE16#define TYPE long17#endif18 19register TYPE x15 __asm__("x15");20 21TYPE foo() {22  return x15;23}24