If a person in the state of mortal sin is threatened with death unless he denies the Faith, and he refuses to do so, then he is no longer in the state of mortal sin.
I believe that God is mercifully generous with all those who die for belief in Him.
Church teaching on this please?