* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.
[official-gcc.git] / gcc / testsuite / gcc.dg / weak / weak-1.c
blob078c3ef36151858b6275ba16471cc0256069abb0
1 /* { dg-do compile } */
2 /* { dg-require-weak "" } */
3 /* { dg-options "-fno-common" } */
5 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
6 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?b" } } */
7 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?c" } } */
8 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?d" } } */
9 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?e" } } */
10 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?g" } } */
11 /* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?i" } } */
12 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?j" } } */
14 #pragma weak a
15 int a;
17 int b;
18 #pragma weak b
20 #pragma weak c
21 extern int c;
22 int c;
24 extern int d;
25 #pragma weak d
26 int d;
28 #pragma weak e
29 void e(void) { }
31 #if 0
32 /* This permutation is illegal. */
33 void f(void) { }
34 #pragma weak f
35 #endif
37 #pragma weak g
38 int g = 1;
40 #if 0
41 /* This permutation is illegal. */
42 int h = 1;
43 #pragma weak h
44 #endif
46 #pragma weak i
47 extern int i;
49 #pragma weak j
50 extern int j;
51 int use_j() { return j; }