Debtors can discharge their taxes in bankruptcy so long as they meet certain tests: the three-year test, the two-year test, the 240-day test and no fraud. I lay it out in the first paragraphs here and in the last paragraphs here.
One of the tests is that the return has to have been actually filed: “A discharge . . . does not discharge an individual debtor for any debt . .. for a tax or a customs duty . . . . with respect to which a return . . . was not filed or given.” 11 USC § 523(a)(1)(B)(i). A “return” must satisfy non-bankruptcy law, and can be a return prepared by the IRS under IRC § 6020(a), but not under 6020(b). 11 USC § 523(a).
This jargon and its cross-references mean that a taxpayer has to have submitted their own, good-faith tax return in order to have the resulting tax be dischargeable. Under IRC § 6020(b), the IRS can prepare a return without the taxpayer’s cooperation and make an assessment on it. This is known as a “substitute for return” (or SFR), and its assessment is never dischargeable. The taxpayer can never replace the SFR with a late-filed return after taxes owed from an SFR have been assessed.
How do you know that the IRS has filed a substitute for return? You look at the taxpayer’s account transcript. The first entry is almost always under TC (transaction code) 150. When the taxpayer files his own return, the entry states “tax return filed,” and it shows the taxes due on the return such as on this transcript. When the IRS files the taxpayer’s return, the entry states “Substitute tax return prepared by IRS,” and it shows a dollar entry of “0.00” such as on this transcript.