No gain or loss shall be recognized on a transfer of property from an individual to (or in trust for the benefit of)-
a spouse, or
a former spouse, but only if the transfer is incident to the divorce.
Transfer treated as gift; transferee has transferor™s basis
In the case of any transfer of property described in subsection (a)-
for purposes of this subtitle, the property shall be treated as acquired by the transferee by gift, and
the basis of the transferee in the property shall be the adjusted basis of the transferor.
Incident to divorce
For purposes of subsection (a)(2), a transfer of property is incident to the divorce if such transfer-
occurs within 1 year after the date on which the marriage ceases, or
is related to the cessation of the marriage.
Special rule where spouse is nonresident alien
Subsection (a) shall not apply if the spouse (or former spouse) of the individual making the transfer is a nonresident alien.
Transfers in trust where liability exceeds basis
Subsection (a) shall not apply to the transfer of property in trust to the extent that-
the sum of the amount of the liabilities assumed, plus the amount of the liabilities to which the property is subject, exceeds
the total of the adjusted basis of the property transferred.
Proper adjustment shall be made under subsection (b) in the basis of the transferee in such property to take into account gain recognized by reason of the preceding sentence.