PURPOSE: To improve detection speed and to securely detect error by detecting a program error by means of a specified error detection circuit without depending on the syntax analysis.
CONSTITUTION: At the time of generating a source program taking an automatic variable in a stack area, the program error which is to forget to initialize the pointer value while making a pointer variable an automatic variable, is detected. A compiler is provided with a means for translating the source program into an object program and a means for automatically adding an instruction setting a pointer value to a previously decided address value in the case of making the pointer variable an automatic variable. An error detection circuit 30 detects the reading/writing of a memory area in a previously decided range including the set address value and outputs an error signal at the time of executing the object program. A notice means informs an operator of the forgetfulness of the initialization of the pointer value in the source program.