substrate 101. A polysilicon film is formed on the pad oxide film. A silicon nitride film is formed on the polysilicon film. A photoresist pattern (not illustrated) is formed on the silicon nitride film.
With the use of the photoresist pattern as a mask, an anisotropic etching treatment is carried out on the silicon nitride film, the polysilicon film, and the pad oxide film to expose a surface of the silicon substrate 101, thereby forming a mask pattern including a silicon nitride film 104a, a polysilicon film 103a, and a pad oxide film 102a for forming a trench. With the use of the mask pattern as a mask, an anisotropic etching treatment is carried out on the silicon substrate 101 to form a trench 106.
Subsequently, referring to FIG. 19,a thermal treatment (inner wall oxidation process) is carried out to form an oxide film 107 on the exposed surface of the trench 106, on the side surface of the pad oxide film, and on the side surface of the polysilicon film 103a. 
Next, referring to FIG. 20, a silicon oxide film 108 is formed to fill the trench 106. Thereafter, a chemical mechanical polishing treatment is carried out to polish the surface of the silicon oxide film 108. Next, referring to FIG. 21, a wet etching treatment is carried out on the silicon oxide film 108 to expose the silicon nitride film 104a almost completely.
Thereafter, the exposed silicon nitride film 104a is removed, and further the polysilicon film 103a and the pad oxide film 102a are successively