source: trunk/testcase/weak/weak-main.c@ 305

Last change on this file since 305 was 305, checked in by bird, 22 years ago

Initial testcase.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 491 bytes
Line 
1/* very simple testcase/experiment for weak symbols. */
2extern int bar;
3
4int foo(void)
5{
6 return 1;
7}
8
9int main()
10{
11 int i;
12 int cErrors = 0;
13
14 i = foo();
15 if (i != 1)
16 {
17 printf("foo -> %d expected 1\n", i);
18 cErrors++;
19 }
20
21 i = doo();
22 if (i != -2)
23 {
24 printf("doo -> %d expected -2\n", i);
25 cErrors++;
26 }
27
28 if (bar != -1)
29 {
30 printf("bar == %d expected -1\n", bar);
31 cErrors++;
32 }
33
34 return cErrors;
35}
Note: See TracBrowser for help on using the repository browser.