If property was acquired by a corporation in connection with a reorganization to which this part applies, then the basis shall be the same as it would be in the hands of the transferor, increased in the amount of gain recognized to the transferor on such transfer. This subsection shall not apply if the property acquired consists of stock or securities in a corporation a party to the reorganization, unless acquired by the exchange of stock or securities of the transferee (or of a corporation which is in control of the transferee) as the consideration in whole or in part for the transfer.
In no event shall the basis of any property be increased under subsection (a) or (b) above the fair market value of such property (determined without regard to section 7701(g)) by reason of any gain recognized to the transferor as a result of the assumption of a liability.
If in any transaction described in subsection (a) or (b) there would (but for this subsection) be an importation of a net built-in loss, the basis of each property described in subparagraph (B) which is acquired in such transaction shall (notwithstanding subsections (a) and (b)) be its fair market value immediately after such transaction.
For purposes of subparagraph (A), there is an importation of a net built-in loss in a transaction if the transferee’s aggregate adjusted bases of property described in subparagraph (B) which is transferred in such transaction would (but for this paragraph) exceed the fair market value of such property immediately after such transaction.
The aggregate reduction in basis by reason of subparagraph (A) shall be allocated among the property so transferred in proportion to their respective built-in losses immediately before the transaction.