PyPy3: Translation issue: "TyperError: arithmetic not supported on <INT>, its size is too small"

Hi While translating the latest version of pypy3 on FreeBSD (and after applying the fix for https://bitbucket.org/pypy/pypy/issues/2348) I get the following error: File "/usr/local/home/dbn/ports/ports/lang/pypy3/work/pypy3.3-v5.2.0-alpha1- src/rpython/rtyper/rint.py", line 25, in opprefix self.lowleveltype) [translation:ERROR] TyperError: arithmetic not supported on <INT>, its size is too small .. (pypy.module.time.interp_time:988)clock .. block@3 with 2 exits(v1573) .. v1575 = eq(value_25, v1574) The error occurs when translating pypy/module/time/interp_time, line 996: if value == rffi.cast(clock_t, -1): Although this can be easily fixed by casting value to r_int instead, it then causes another issue on line 969: cpu_time = float(tms.c_tms_utime + tms.c_tms_stime) Again, same issue of TyperError with <INT> (this time, instead of with clock_t [1][2] but with TMS.tms_utime [3]). I have been unable to figure out how a rpython.rtyper.lltypesystem.lltype.Number (which a believe an INT is) gets converted into a rpython.rtyper.rint.IntegerRepr, or why it gets converted without an opprefix set. Any suggestions how to fix this issue, or what the root cause is, will be greatly appreciated. Regards David [1] clock_t is defined, in platcheck_73 as: -+- clock_t size: 4 unsigned: 0 --- [2] On FreeBSD clock_t is typedef as unsigned long. [3] TMS is defined in platcheck_7 as: -+- TMS align: 4 size: 16 fldofs tms_utime: 0 fldsize tms_utime: 4 fldunsigned tms_utime: 0 fldofs tms_stime: 4 fldsize tms_stime: 4 fldunsigned tms_stime: 0 fldofs tms_cutime: 8 fldsize tms_cutime: 4 fldunsigned tms_cutime: 0 fldofs tms_cstime: 12 fldsize tms_cstime: 4 fldunsigned tms_cstime: 0
participants (2)
-
David Naylor
-
marky1991 .