26 USC 755 - Rules for allocation of basis
Any increase or decrease in the adjusted basis of partnership property under section 734 (b) (relating to the optional adjustment to the basis of undistributed partnership property) or section 743 (b) (relating to the optional adjustment to the basis of partnership property in the case of a transfer of an interest in a partnership) shall, except as provided in subsection (b), be allocated
In applying the allocation rules provided in subsection (a), increases or decreases in the adjusted basis of partnership property arising from a distribution of, or a transfer of an interest attributable to, property consisting of
shall be allocated to partnership property of a like character except that the basis of any such partnership property shall not be reduced below zero. If, in the case of a distribution, the adjustment to basis of property described in paragraph (1) or (2) is prevented by the absence of such property or by insufficient adjusted basis for such property, such adjustment shall be applied to subsequently acquired property of a like character in accordance with regulations prescribed by the Secretary.
In making an allocation under subsection (a) of any decrease in the adjusted basis of partnership property under section 734 (b)
Gain shall be recognized to the partnership to the extent that the amount required to be allocated under paragraph (2) to other partnership property exceeds the aggregate adjusted basis of such other property immediately before the allocation required by paragraph (2).