The Catholic Church has issued a warning to its clergy in Washington state: Any priest who complies with a new law requiring the reporting of child abuse confessions to authorities will be excommunicated.
https://www.newsweek.com/catholic-church-excommunicate-priests-following-new-us-state-law-2069039
“Compelled by law” isn’t a sufficient justification for Catholics in this case - they’re supposed to die rather than reveal something that was said to them in confession, like Saint John of Nepomuk.