If a company chose to fire me for that, I would not want to work at that company anyhow.
I know this is somewhat naive; not everyone is in a position where they can pick and choose what companies they wish to work at. But still, such a company would be a terrible company to work at.