I mistyped -- what I meant was that homosexual behavior is immoral but not always illegal whereas pedophilia is immoral AND illegal (in every civilized country I'm aware of).
I don't know what goes on in the heads of men who decide to undertake (if they are honest) a life of celibacy. Certainly they are different from most men. Some may not be attracted to women, some may not have much of a sex drive at all, and some might be attracted to men. If it's not an issue for them and they put their lives and behavior in order and stick with it then they will hopefully make good priest.
But any priest who declares himself a homosexual is probably in the wrong profession. The need for that sort of declaration just doesn't have a place in their lives.