source:
trunk/testcase/weak/weak2-main.c@
693
| Last change on this file since 693 was 307, checked in by , 23 years ago | |
|---|---|
|
|
| File size: 1016 bytes | |
| Line | |
|---|---|
| 1 | /* test more complex weak stuff. Both weak symbols and weak external symbols. */ |
| 2 | #include <stdio.h> |
| 3 | extern int bar1; |
| 4 | extern int bar2; |
| 5 | extern int bar3; |
| 6 | extern int bar4; |
| 7 | extern int bar5; |
| 8 | extern int bar6; |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | int i; |
| 13 | int cErrors = 0; |
| 14 | |
| 15 | i = foo(); |
| 16 | if (i != 1) |
| 17 | { |
| 18 | printf("foo() returned %d, exepcted 1\n", i); |
| 19 | cErrors++; |
| 20 | } |
| 21 | |
| 22 | i = foo3(); |
| 23 | if (i != 1) |
| 24 | { |
| 25 | printf("foo3() returned %d, exepcted 1\n", i); |
| 26 | cErrors++; |
| 27 | } |
| 28 | |
| 29 | i = foo4(); |
| 30 | if (i != -1) |
| 31 | { |
| 32 | printf("foo4() returned %d, exepcted -1\n", i); |
| 33 | cErrors++; |
| 34 | } |
| 35 | |
| 36 | i = foo5(); |
