The param of rand() function should be literal, but current compiler ignore to validate the literal param of rand function, it is validated in execution step. This PR make it validated in compile step, and make it more earlier to find the usage error of rand() function.