From 3bc9c325c5fa754043986cc70ff2af45c2196c38 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 4 Oct 2016 01:20:33 +0200 Subject: Fix const folding of 64bit pointer constants See testcase. --- tests/tcctest.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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() -- cgit v1.3.1