1 /* Check semantics of various constructs to generate renamed symbols. */
3 extern int printf (const char *, ...);
6 printf("in target function\n");
8 void alias_for_target(void) __attribute__((alias("target")));
11 int alias_int
__attribute__((alias("g_int")));
13 #ifdef __leading_underscore
19 void asm_for_target(void) __asm__(_
"target");
20 int asm_int
__asm__(_
"g_int");
22 /* This is not supposed to compile, alias targets must be defined in the
23 same unit. In TCC they even must be defined before the reference
24 void alias_for_undef(void) __attribute__((alias("undefined")));
27 extern void inunit2(void);
34 printf("g_int = %d\nalias_int = %d\nasm_int = %d\n", g_int
, alias_int
, asm_int
);