diff options
| author | Michael Matz <matz@suse.de> | 2016-07-11 16:26:36 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:07 +0100 |
| commit | 10c351488901667059181cf034dd500354f352ed (patch) | |
| tree | f4d97bfb0151f724a21fc9e653e59a372fd82ae1 /tests | |
| parent | 920474115c3182b19008598b0def86cb8fdf1318 (diff) | |
| download | tinycc-10c351488901667059181cf034dd500354f352ed.tar.gz tinycc-10c351488901667059181cf034dd500354f352ed.tar.bz2 | |
Accept symbols in initializers also on 64 bit
Those should use long or long long type, and generate a 64bit reloc.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tcctest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index 9230020..bb6e741 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2230,10 +2230,17 @@ int reltab[3] = { 1, 2, 3 }; int *rel1 = &reltab[1]; int *rel2 = &reltab[2]; +void getmyaddress(void) +{ + printf("in getmyaddress\n"); +} +unsigned long theaddress = (unsigned long)getmyaddress; void relocation_test(void) { + void (*fptr)(void) = (void (*)(void))theaddress; printf("*rel1=%d\n", *rel1); printf("*rel2=%d\n", *rel2); + fptr(); } void old_style_f(a,b,c) |
