One dies as a matyr but has committed shirk. Where do they go?

Allah is all forgiven and Merciful. The person will be rewarded according to his or her intention.