blob: 58b4a865a22d58a3dc0ea3d78dbdcc7fedeb4eea [file] [log] [blame]
Reed Kotler7dfd1822013-01-16 17:10:28 +00001// RUN: %clang_cc1 -triple mipsel-linux-gnu -fsyntax-only -verify %s
2
3void foo32();
4void foo16();
Aaron Ballmanbaec7782013-07-23 19:30:11 +00005void __attribute__((nomips16)) foo32();
6void __attribute__((mips16)) foo16();
Reed Kotler7dfd1822013-01-16 17:10:28 +00007
Aaron Ballmanbaec7782013-07-23 19:30:11 +00008void __attribute__((nomips16)) foo32_();
9void __attribute__((mips16)) foo16_();
Reed Kotler7dfd1822013-01-16 17:10:28 +000010void foo32_();
11void foo16_();
12
Aaron Ballmanbaec7782013-07-23 19:30:11 +000013void foo32__() __attribute__((nomips16));
14void foo32__() __attribute__((mips16));
Reed Kotler7dfd1822013-01-16 17:10:28 +000015
Aaron Ballmanbaec7782013-07-23 19:30:11 +000016void foo32a() __attribute__((nomips16(xyz))) ; // expected-error {{'nomips16' attribute takes no arguments}}
17void __attribute__((mips16(xyz))) foo16a(); // expected-error {{'mips16' attribute takes no arguments}}
Reed Kotler7dfd1822013-01-16 17:10:28 +000018
Aaron Ballmanbaec7782013-07-23 19:30:11 +000019void __attribute__((nomips16(1, 2))) foo32b(); // expected-error {{'nomips16' attribute takes no arguments}}
20void __attribute__((mips16(1, 2))) foo16b(); // expected-error {{'mips16' attribute takes no arguments}}
Reed Kotler7dfd1822013-01-16 17:10:28 +000021
22
23__attribute((nomips16)) int a; // expected-error {{attribute only applies to functions}}
24
25__attribute((mips16)) int b; // expected-error {{attribute only applies to functions}}
26
27