(1) Charitable trusts For purposes of part II of subchapter F of chapter 1 (other than section
508 (a), (b), and (c)) and for purposes of this chapter, a trust which is not exempt from taxation under section
501 (a), all of the unexpired interests in which are devoted to one or more of the purposes described in section
170 (c)(2)(B), and for which a deduction was allowed under section
170,
545 (b)(2),
642 (c),
2055,
2106 (a)(2), or
2522 (or the corresponding provisions of prior law), shall be treated as an organization described in section
501 (c)(3). For purposes of section
509 (a)(3)(A), such a trust shall be treated as if organized on the day on which it first becomes subject to this paragraph.
(2) Split-interest trusts In the case of a trust which is not exempt from tax under section
501 (a), not all of the unexpired interests in which are devoted to one or more of the purposes described in section
170 (c)(2)(B), and which has amounts in trust for which a deduction was allowed under section 170, 545 (b)(2), 642 (c), 2055, 2106 (a)(2), or 2522, section
507 (relating to termination of private foundation status), section
508 (e) (relating to governing instruments) to the extent applicable to a trust described in this paragraph, section
4941 (relating to taxes on self-dealing), section
4943 (relating to taxes on excess business holdings) except as provided in subsection (b)(3), section 4944 (relating to investments which jeopardize charitable purpose) except as provided in subsection (b)(3), and section
4945 (relating to taxes on taxable expenditures) shall apply as if such trust were a private foundation. This paragraph shall not apply with respect to
(B) any amounts in trust other than amounts for which a deduction was allowed under section
170,
545 (b)(2),
642 (c),
2055,
2106 (a)(2), or
2522, if such other amounts are segregated from amounts for which no deduction was allowable, or
(C) any amounts transferred in trust before May 27, 1969.