(1) In general In determining the tax under this chapter of a shareholder for the shareholders taxable year in which the taxable year of the S corporation ends (or for the final taxable year of a shareholder who dies, or of a trust or estate which terminates, before the end of the corporations taxable year), there shall be taken into account the shareholders pro rata share of the corporations
(A) items of income (including tax-exempt income), loss, deduction, or credit the separate treatment of which could affect the liability for tax of any shareholder, and
(B) nonseparately computed income or loss.
For purposes of the preceding sentence, the items referred to in subparagraph (A) shall include amounts described in paragraph (4) or (6) of section 702 (a).