Indentation was missing after empty string check was added by wanjochan.
[tinycc.git] / tests / asm-c-connect-1.c
blobd79270d4e4ed0abcf10d26bc31d80036f8373733
1 #include <stdio.h>
3 #if (defined _WIN32 || defined __APPLE__) && (!defined __TINYC__ || defined __leading_underscore)
4 # define _ "_"
5 #else
6 # define _
7 #endif
9 #ifdef __clang__
10 /* clang needs some help tp not throw functions away even at -O0 */
11 #define __USED __attribute__((__used__))
12 #else
13 #define __USED
14 #endif
16 static int __USED x1_c (void)
18 printf(" x1");
19 return 1;
22 asm(".text;"_"x1: call "_"x1_c; ret");
24 void callx4(void);
25 void callx5_again(void);
27 void x6()
29 printf(" x6-1");
32 int main(int argc, char *argv[])
34 printf("*");
35 asm("call "_"x1");
36 asm("call "_"x2");
37 asm("call "_"x3");
38 callx4();
39 asm("call "_"x5");
40 callx5_again();
41 x6();
42 printf(" *\n");
43 return 0;
46 static
47 int __USED x2(void)
49 printf(" x2");
50 return 2;
53 extern int x3(void);
55 void x4(void)
57 printf(" x4");
60 void x5(void);
61 void x5(void)
63 printf(" x5");