]> git.sur5r.net Git - cc65/blob - test/ref/cc65090111.c
added tests as prepared by oliver
[cc65] / test / ref / cc65090111.c
1 /*
2   !!DESCRIPTION!! 
3   !!ORIGIN!!      testsuite
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!
6 */
7
8 /*
9 cc65 doesn't compile this, if i use the "-O"-option.
10 but it works with "while(!0)"; instead of  "for(;;);"
11
12 i'm using cl65 V2.12.9 win
13
14 ----
15 #include <stdint.h>
16
17 int main(void)
18 {
19  static uint8_t x = 0;
20  static uint8_t y = 0;
21
22     for (x = 0; x < 16; ++x)
23     {
24      y = y + 1;
25     }
26     for(;;);
27 }
28 */
29
30 #include <stdint.h>
31
32 int test(void)
33 {
34  static uint8_t x = 0;
35  static uint8_t y = 0;
36
37     for (x = 0; x < 16; ++x)
38     {
39      y = y + 1;
40     }
41     for(;;);
42 }
43
44 int main(void)
45 {
46     printf("it works :)\n");
47
48     return 0;
49 }