Except as provided in subsection (b), if property is transferred to a trust in exchange for an interest in other trust property and if the trust would be an investment company (within the meaning of section
351) if it were a corporation, then gain shall be recognized to the transferor.