on transfers by gift or in trust (A) In general No loss shall be recognized with respect to any covered asset which is treated as sold under subsection (a) by reason of a transfer by gift or in trust. (B) Amount of gain for transferee If a loss is not recognized by the transferor by reason of subparagraph (A) and the transferee sells or otherwise disposes of the covered asset (or of other property the basis of which in the taxpayer's hands is determined directly or indirectly by reference to such property) at a gain, then such gain shall be recognized only to the extent that it exceeds so much of such loss as is properly allocable to the covered asset sold or otherwise disposed of by the transferee. (3) Person described A person is described in this section if such person is— (A) an individual who is an applicable taxpayer for the taxable year in which the transfer is made, or (B) an applicable entity with respect to which a notice received by the entity under subsection (b)(2)(A) or (c)(2) of section 493 is in effect at the time of such transfer. (b) Special rules for certain grantor trusts (1) Transfers of nontradable covered assets into certain grantor trusts For purposes of applying this section to any transfer in trust, except as otherwise provided in this paragraph, any transfer of a nontradable covered asset from the person treated as the owner of an applicable grantor trust (other than a grantor trust which is a wholly revocable trust) to such trust shall be treated as a transfer to which subsection (a) applies. (2) Deemed distributions In the case of any applicable grantor trust, any property held by such trust shall be treated as transferred by the owner in a transfer to which subsection (a) applies— (A) on any date that— (i) the owner ceases to be treated as the owner under this chapter, (ii) such property is distributed to any person other than the owner, or (iii) the property would no longer be included in the owner’s gross estate under chapter 11, or (B) on the date of the death of the owner. (3)