§ 707.
(b)
Certain sales or exchanges of property with respect to controlled partnerships
(1)
Losses disallowed
No deduction shall be allowed in respect of losses from sales or exchanges of property (other than an interest in the partnership), directly or indirectly, between—
(A)
a partnership and a person owning, directly or indirectly, more than 50 percent of the capital interest, or the profits interest, in such partnership, or
(B)
two partnerships in which the same persons own, directly or indirectly, more than 50 percent of the capital interests or profits interests.
In the case of a subsequent sale or exchange by a transferee described in this paragraph, section 267(d) shall be applicable as if the loss were disallowed under section 267(a)(1). For purposes of section 267(a)(2), partnerships described in subparagraph (B) of this paragraph shall be treated as persons specified in section 267(b).
(2)
Gains treated as ordinary income
In the case of a sale or exchange, directly or indirectly, of property, which in the hands of the transferee, is property other than a capital asset as defined in section 1221—
(A)
between a partnership and a person owning, directly or indirectly, more than 50 percent of the capital interest, or profits interest, in such partnership, or
(B)
between two partnerships in which the same persons own, directly or indirectly, more than 50 percent of the capital interests or profits interests,
any gain recognized shall be considered as ordinary income.
(3)
Ownership of a capital or profits interest
([Aug. 16, 1954, ch. 736], [68A Stat. 243]; [Pub. L. 94–455, title II, § 213(b)(3)], title XIX, § 1901(b)(3)(C), Oct. 4, 1976, [90 Stat. 1547], 1792; [Pub. L. 98–369, div. A, title I, § 73(a)], July 18, 1984, [98 Stat. 591]; [Pub. L. 99–514, title VI, § 642(a)(2)], title XVIII, §§ 1805(b), 1812(c)(3)(A), (B), Oct. 22, 1986, [100 Stat. 2284], 2810, 2834.)