If any person be a subscribing witness to a will wherein any devise or bequest is made to him and the will cannot otherwise be proven, such devise or bequest shall be void, and the witness shall be competent as to the residue of the will as if a devise or bequest had not been made to him, and he may be compelled to testify. If such witness would have been entitled to any share of the testator’s estate in case the will were not established, then so much of such share shall be saved to the witness as shall not exceed the value of the devise or bequest made to him in the will.