Consider the following, if the size of array `a` is 1, 2, or 3, the object is zero-mem'd once: type MyObj = object a: array[3, int] proc main() = var src = MyObj() Run
generates: N_LIB_PRIVATE N_NIMCALL(void, main__mem_u24)(void) { tyObject_MyObj__vMtai2NAsuOGP0DwTeytUg src; nimZeroMem((void*)(&src), sizeof(tyObject_MyObj__vMtai2NAsuOGP0DwTeytUg)); } Run If the size is 4 or more: type MyObj = object a: array[4, int] proc main() = var src = MyObj() Run generates: N_LIB_PRIVATE N_NIMCALL(void, main__mem_u24)(void) { tyObject_MyObj__vMtai2NAsuOGP0DwTeytUg src; nimZeroMem((void*)(&src), sizeof(tyObject_MyObj__vMtai2NAsuOGP0DwTeytUg)); nimZeroMem((void*)(&src), sizeof(tyObject_MyObj__vMtai2NAsuOGP0DwTeytUg)); } Run The same happens if the fields of `MyObj` are just multiple ints instead of an array (3 int fields vs. 4 or more int fields). Is this a bug?