That sort of thing would simply end the confessional as we and the Church know it. The confessional does provide an outlet for sinners to confess and to amend. Grave sins, especially if they are also crimes are not simply heard then the penitent gets three Hail Marys and two our Fathers. He is told that he is NOT forgiven if he does not get himself straight with God and the Law. He must cease the actions that lead to or constitute the sin and part of ceasing is to confess felonies to the authorities. In society men are to obey the law, whatever the law is, whatever is the system, except for laws outlawing Christianity. A priest must disobey any law that requires him to report a confession. If he breaks the Church law about confessions he will lose his priestly faculties and will himself have committed a grave sin.
except for laws outlawing Christianity.
Of course depending on what the Gospel to different people are, if some one considers Pauls writing as the Gospel then you should not mind getting a ticket for breaking the speed limit.
But Jesus said do unto others as you would have them do unto you, which puts a little different light on things.