tinycc/tests/asm-c-connect-2.c
Michael Matz cc6cb7f0e2 Fix another corner case with C/asm symtable
See testcase (from grischka).  If the asm has no .globl,
but there's a (non-static) C definition the symbol should
be exported, even if the first reference comes from asm.
2017-12-04 03:51:14 +01:00

20 lines
327 B
C

#include <stdio.h>
int x3(void)
{
printf("x3\n");
return 3;
}
/* That callx4 is defined globally (as if ".globl callx4")
is a TCC extension. GCC doesn't behave like this. */
void callx4(void);
__asm__("callx4: call x4; ret");
extern void x5(void);
void callx5_again(void);
void callx5_again(void)
{
x5();
}