Currently, if a program divides or mods by a constant zero, the compiler will generate code that leads to a runtime panic. This should be detected at compile time and reported as an error.
(Note that the compiler already does compile-time constant folding, so this should be easy to check for.)