After that, a thin film (a thin film formed of a semiconductor material, an insulating material or a conductive material) existing except in a portion to become a semiconductor region or a wiring is removed by etching using the resist mask as a mask to form the semiconductor region or the wiring. (Reference 1: Japanese Patent Laid-Open No. 2000-188251) However, when a semiconductor film is etched