brintos

brintos / llvm-project-archived public Read only

0
0
Text · 868 B · eb02598 Raw
31 lines · c
1// RUN: %clang_cc1 -verify %s2 3void f(void);4void f(void) __asm__("fish");5void g(void);6 7void f(void) {8  g();9}10void g(void) __asm__("gold");  // expected-error{{cannot apply asm label to function after its first use}}11 12void h(void) __asm__("hose");  // expected-note{{previous declaration is here}}13void h(void) __asm__("hair");  // expected-error{{conflicting asm label}}14 15int x;16int x __asm__("xenon");17int y;18 19int test(void) { return y; }20 21int y __asm__("yacht");  // expected-error{{cannot apply asm label to variable after its first use}}22 23int z __asm__("zebra");  // expected-note{{previous declaration is here}}24int z __asm__("zooms");  // expected-error{{conflicting asm label}}25 26 27// No diagnostics on the following.28void __real_readlink(void) __asm("readlink");29void readlink(void) __asm("__protected_readlink");30void readlink(void) { __real_readlink(); }31