diff options
| author | Michael Matz <matz@suse.de> | 2016-10-04 01:20:33 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:12 +0100 |
| commit | 3bc9c325c5fa754043986cc70ff2af45c2196c38 (patch) | |
| tree | 39d667d690aef2b77597d060117b80ccccedcb12 /tccgen.c | |
| parent | 0b0e64c2c95487815a8d252ab833e5eccfb5aeb5 (diff) | |
| download | tinycc-3bc9c325c5fa754043986cc70ff2af45c2196c38.tar.gz tinycc-3bc9c325c5fa754043986cc70ff2af45c2196c38.tar.bz2 | |
Fix const folding of 64bit pointer constants
See testcase.
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1659,10 +1659,10 @@ static void gen_opic(int op) uint64_t l2 = c2 ? v2->c.i : 0; int shm = (t1 == VT_LLONG) ? 63 : 31; - if (t1 != VT_LLONG) + if (t1 != VT_LLONG && (PTR_SIZE != 8 || t1 != VT_PTR)) l1 = ((uint32_t)l1 | (v1->type.t & VT_UNSIGNED ? 0 : -(l1 & 0x80000000))); - if (t2 != VT_LLONG) + if (t2 != VT_LLONG && (PTR_SIZE != 8 || t2 != VT_PTR)) l2 = ((uint32_t)l2 | (v2->type.t & VT_UNSIGNED ? 0 : -(l2 & 0x80000000))); |
