I compiled m4 1.4.17 with -fsanitize=undefined enabled. -fsanitize=undefined is a compiler flag that enables runtime checks for different types of undefined behavior.
It turned out that a test 189.eval fails with m4 compiled with this option.
The problem is signed integer overflow. I fixed this problem in the same manner as it is done in evaluation of expressions.