1*67e74705SXin Li // RUN: %clang_cc1 -triple i386-apple-darwin10 -fsyntax-only -verify %s 2*67e74705SXin Li 3*67e74705SXin Li int a __attribute__((force_align_arg_pointer)); // expected-warning{{attribute only applies to functions}} 4*67e74705SXin Li 5*67e74705SXin Li // It doesn't matter where the attribute is located. 6*67e74705SXin Li void b(void) __attribute__((force_align_arg_pointer)); 7*67e74705SXin Li void __attribute__((force_align_arg_pointer)) c(void); 8*67e74705SXin Li 9*67e74705SXin Li // Functions only have to be declared force_align_arg_pointer once. b(void)10*67e74705SXin Livoid b(void) {} 11*67e74705SXin Li 12*67e74705SXin Li // It doesn't matter which declaration has the attribute. 13*67e74705SXin Li void d(void); d(void)14*67e74705SXin Livoid __attribute__((force_align_arg_pointer)) d(void) {} 15*67e74705SXin Li 16*67e74705SXin Li // Attribute is ignored on function pointer types. 17*67e74705SXin Li void (__attribute__((force_align_arg_pointer)) *p)(); 18*67e74705SXin Li typedef void (__attribute__((__force_align_arg_pointer__)) *p2)(); 19*67e74705SXin Li // Attribute is also ignored on function typedefs. 20*67e74705SXin Li typedef void __attribute__((force_align_arg_pointer)) e(void); 21*67e74705SXin Li 22