1 /* { dg-do compile } */
2 /* { dg-require-weak "" } */
3 /* { dg-require-alias "" } */
4 /* { dg-options "-fno-common" } */
5
6 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f1" } } */
7 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f2" } } */
8 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f3" } } */
9 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f4" } } */
10
notf1()11 void notf1() { }
notf2()12 void notf2() { }
notf3()13 void notf3() { }
notf4()14 void notf4() { }
15
16 void f1() __attribute__((weak, alias("notf1")));
17 void f2() __attribute__((alias("notf2"), weak));
18
19 #pragma weak f3=notf3
20 void f3();
21
22 void f4();
23 #pragma weak f4=notf4
24