aboutsummaryrefslogtreecommitdiff
path: root/tests/tcctest.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-10-04 01:20:33 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:12 +0100
commit3bc9c325c5fa754043986cc70ff2af45c2196c38 (patch)
tree39d667d690aef2b77597d060117b80ccccedcb12 /tests/tcctest.c
parent0b0e64c2c95487815a8d252ab833e5eccfb5aeb5 (diff)
downloadtinycc-3bc9c325c5fa754043986cc70ff2af45c2196c38.tar.gz
tinycc-3bc9c325c5fa754043986cc70ff2af45c2196c38.tar.bz2
Fix const folding of 64bit pointer constants
See testcase.
Diffstat (limited to 'tests/tcctest.c')
-rw-r--r--tests/tcctest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c
index 22d9e88..5190523 100644
--- a/tests/tcctest.c
+++ b/tests/tcctest.c
@@ -946,6 +946,12 @@ void expr_ptr_test()
j = -1;
printf("%d\n", sp[j].i);
}
+#ifdef __LP64__
+ i = 1;
+ p = (int*)0x100000000UL + i;
+ i = ((long)p) >> 32;
+ printf("largeptr: %p %d\n", p, i);
+#endif
}
void expr_cmp_test()