Problem with modulo (%) and reset

void loop() {
  n1000 = ldiv(m++,1000000L);  // This hangs Arduino while pressing reset
}

Confirmed;