diff options
| author | Michael Matz <matz@suse.de> | 2017-12-04 03:51:14 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2017-12-04 03:51:14 +0100 |
| commit | cc6cb7f0e294f0c98c4970c7ec993709fc2daa1a (patch) | |
| tree | d780f1752a932f06acec05bd1cbdce5a0f48ee04 /tests/asm-c-connect-2.c | |
| parent | 529b44c0d53955309e79de3da677973922f48425 (diff) | |
| download | tinycc-cc6cb7f0e294f0c98c4970c7ec993709fc2daa1a.tar.gz tinycc-cc6cb7f0e294f0c98c4970c7ec993709fc2daa1a.tar.bz2 | |
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.
Diffstat (limited to 'tests/asm-c-connect-2.c')
| -rw-r--r-- | tests/asm-c-connect-2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/asm-c-connect-2.c b/tests/asm-c-connect-2.c index 7ab9dc3..5dad26c 100644 --- a/tests/asm-c-connect-2.c +++ b/tests/asm-c-connect-2.c @@ -6,5 +6,14 @@ int x3(void) 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(); +} |
