Commit | Line | Data |
---|---|---|
61315175 L |
1 | #include <stdio.h> |
2 | ||
3 | int x; | |
6d636d8c | 4 | int y; |
61315175 L |
5 | |
6 | __attribute__((weak)) | |
6d636d8c | 7 | void foobar (void) { y++; x++; } |
61315175 L |
8 | |
9 | int main (void) | |
10 | { | |
11 | foobar (); | |
6d636d8c L |
12 | if (y == 0) |
13 | { | |
14 | if (x == -1) | |
15 | printf ("OK\n"); | |
16 | } | |
17 | else | |
18 | { | |
19 | if (x == 1) | |
20 | printf ("OK\n"); | |
21 | } | |
61315175 L |
22 | return 0; |
23 | } |