mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
Some checks failed
build and test / test-x86_64-linux (push) Has been cancelled
build and test / test-x86_64-osx (push) Has been cancelled
build and test / test-aarch64-osx (push) Has been cancelled
build and test / test-x86_64-win32 (push) Has been cancelled
build and test / test-i386-win32 (push) Has been cancelled
build and test / test-arm64-win32 (push) Has been cancelled
build and test / test-armv7-linux (push) Has been cancelled
build and test / test-aarch64-linux (push) Has been cancelled
build and test / test-riscv64-linux (push) Has been cancelled
build and test / test-i386-linux (push) Has been cancelled
The host-sized symbol addend parameter was introduced by commit b14ef0e2 and truncates 64-bit addends on LLP64 hosts.
Use addr_t and cover the negative-addend case.
18 lines
336 B
C
18 lines
336 B
C
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
static unsigned short data[844];
|
|
|
|
static uint64_t address_for_index(int index)
|
|
{
|
|
return (uint64_t)(uintptr_t)data - 845186ULL
|
|
+ (uint64_t)index * 2;
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
printf("%d\n", address_for_index(422593)
|
|
== (uint64_t)(uintptr_t)data);
|
|
return 0;
|
|
}
|