We have freedom of speech in this country, so a pastor can tell someone anything he wants. But that doesn't necessarily make it true. In the end, God will determine who is His child and who is not. Until then, we must help one another to grow in the Lord. Without knowing the facts in the case you are referring to, it is impossible for us to determine whether this pastor spoke appropriately or not. There may be times when it is vitally important to tell a person that he is not right with God. We should, however, always speak the truth in love.