1. A method of compiling a source code described by a first programming language, the method being executed by a computer and comprising: specifying a function from the source code, the function being described by a second programming language different from the first programming language, the function being allowed to use one or more arguments; and first creating an instruction to store given data that causes occurrence of an error when a register is accessed due to execution of the function, and storing the given data that causes occurrence of the error in an area in the register for an argument that is not set for the function in the source code among the one or more arguments.