“Hence, if anyone shall dare — which God forbid! — to think otherwise than as has been defined by us, let him know and understand that he is condemned by his own judgment; that he has suffered shipwreck in the faith; that he has separated from the unity of the Church; and that, furthermore, by his own action he incurs the penalties established by law if he should are to express in words or writing or by any other outward means the errors he thinks in his heart.”
(Pope Pius IX, Ineffabilis Deus, 1854) [Emphases mine]
The heretic is condemned by his own judgement and separated from the Church. Any penalties established by the Church in her law (e.g., automatic excommunication) are in addition to the heretic’s self-condemnation. This flies in the face of those who hold (heretically by the way) that one is separated from the Church for heresy only when the Church makes that judgement and not beforehand.