unregisterised GHC generates incorrect 0xUL literals for certain onstants
jakzale reports: 21:47:27 < int-e> Oh, nice. Yes, indeed pprHexVal (2^32^) W32 (function from cmm/PprC.hs) would result in 0xU. 21:50:29 < jakzale> int-e: yes, truncInt takes module 2^32^, then go returns empty string (I guess)
Here comes the test:
$ cat a.cmm
foo() {
bits64 a;
a = 0x10000000000000000; // overflows 64 bits
return (a);
}
$ inplace/bin/ghc-stage2 -c a.cmm
/tmp/ghc8580_0/ghc_2.hc: In function 'foo':
/tmp/ghc8580_0/ghc_2.hc:8:7: error:
error: invalid suffix "xUL" on integer constant
_c0 = 0xUL;
^
I've broke it with commit:43f1b2ec when introduced truncation that can generate more zeroes.