On the singularities of solutions to an elliptic semilinear equation