A method for manufacturing a semiconductor device includes forming, on a
substrate having a recessed portion on a surface, a plating film which is
at least buried in the recessed portion and has a higher impurity
concentration in an upper portion than in a lower portion, thermally
treating the plating film, and removing the thermally treated plating
film except for a portion buried in the recessed portion.