Exception for estates and certain trusts
With respect to any taxable year ending before the date 2 years after the date of the decedent’s death, this section shall not apply to—
(A)#
the estate of such decedent, or
(B)#
any trust—
(i) all of which was treated (under subpart E of part I of subchapter J of chapter 1) as owned by the decedent, and
(ii) to which the residue of the decedent’s estate will pass under his will (or, if no will is admitted to probate, which is the trust primarily responsible for paying debts, taxes, and expenses of administration).
(B)(i)#
all of which was treated (under subpart E of part I of subchapter J of chapter 1) as owned by the decedent, and
(B)(ii)#
to which the residue of the decedent’s estate will pass under his will (or, if no will is admitted to probate, which is the trust primarily responsible for paying debts, taxes, and expenses of administration).