Fixed fsanitize=undefined: left shift of negative value -10000 in lib/templatesimplifier.cpp.