1 // RUN: %clang_cc1 -std=c++11 -triple armv7-unknown-linux-gnueabi -fsyntax-only -verify %s 2 3 struct a { 4 int __attribute__((no_caller_saved_registers)) b; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} fooa5 static void foo(int *a) __attribute__((no_caller_saved_registers)) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 6 }; 7 8 struct a test __attribute__((no_caller_saved_registers)); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 9 bar(int *)10__attribute__((no_caller_saved_registers(999))) void bar(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 11 foo(int *)12__attribute__((no_caller_saved_registers)) void foo(int *){} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 13 foo2(int *)14[[gnu::no_caller_saved_registers]] void foo2(int *) {} // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 15 16 typedef __attribute__((no_caller_saved_registers)) void (*foo3)(int *); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 17 18 typedef void (*foo5)(int *); 19 20 int (*foo4)(double a, __attribute__((no_caller_saved_registers)) float b); // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 21 main(int argc,char ** argv)22int main(int argc, char **argv) { 23 void (*fp)(int *) = foo; 24 a::foo(&argc); 25 foo3 func = foo2; 26 func(&argc); 27 foo5 __attribute__((no_caller_saved_registers)) func2 = foo2; // expected-warning {{unknown attribute 'no_caller_saved_registers' ignored}} 28 return 0; 29 } 30