The penalty function method has received wide attention in state constrained optimization problems. This method usually involves increasing the weight on the penalty function without bound. Herein, examples are presented which show that direct application of the necessary conditions from the penalty function method does not give the optimal solution in the limit or otherwise when singular solutions are not considered. A theorem is proved which shows that a singular solution to a penalty function problem is optimal on the state constraint in the case a solution of the original optimization problem exists. This leads to the concept of compatible state and control constraints; and, the conclusion that if the constraints are not compatible and if the singular solution to the penalty function is not optimal, then the solution from the usual penalty function necessary conditions is not optimal or even suboptimal.