* fold-const.c (fold) [EQ_EXPR]: Place both integer and real
[official-gcc.git] / gcc / testsuite / gcc.dg / weak-1.c
blob0ee5d549ff3a0bac3025b6dbddafbead57807211
1 /* { dg-do compile } */
2 /* { dg-options "-fno-common" } */
4 /* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
5 /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
7 /* { dg-final { global target_triplet } } */
8 /* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
9 /* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
10 /* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
11 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
12 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?b" } } */
13 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?c" } } */
14 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?d" } } */
15 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?e" } } */
16 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?g" } } */
17 /* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?i" } } */
18 /* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?j" } } */
20 #pragma weak a
21 int a;
23 int b;
24 #pragma weak b
26 #pragma weak c
27 extern int c;
28 int c;
30 extern int d;
31 #pragma weak d
32 int d;
34 #pragma weak e
35 void e(void) { }
37 #if 0
38 /* This permutation is illegal. */
39 void f(void) { }
40 #pragma weak f
41 #endif
43 #pragma weak g
44 int g = 1;
46 #if 0
47 /* This permutation is illegal. */
48 int h = 1;
49 #pragma weak h
50 #endif
52 #pragma weak i
53 extern int i;
55 #pragma weak j
56 extern int j;
57 int use_j() { return j; }