(a) Exclusion from gross income of United States persons For purposes of this chapter, the earnings and profits of a foreign corporation attributable to amounts which are, or have been, included in the gross income of a United States shareholder under section
951 (a) shall not, when
(1) such amounts are distributed to, or
(2) such amounts would, but for this subsection, be included under section
951 (a)(1)(B) in the gross income of,
such shareholder (or any other United States person who acquires from any person any portion of the interest of such United States shareholder in such foreign corporation, but only to the extent of such portion, and subject to such proof of the identity of such interest as the Secretary may by regulations prescribe) directly or indirectly through a chain of ownership described under section 958 (a), be again included in the gross income of such United States shareholder (or of such other United States person). The rules of subsection (c) shall apply for purposes of paragraph (1) of this subsection and the rules of subsection (f) shall apply for purposes of paragraph (2) of this subsection.
(b) Exclusion from gross income of certain foreign subsidiaries For purposes of section
951 (a), the earnings and profits of a controlled foreign corporation attributable to amounts which are, or have been, included in the gross income of a United States shareholder under section
951 (a), shall not, when distributed through a chain of ownership described under section
958 (a), be also included in the gross income of another controlled foreign corporation in such chain for purposes of the application of section
951 (a) to such other controlled foreign corporation with respect to such United States shareholder (or to any other United States shareholder who acquires from any person any portion of the interest of such United States shareholder in the controlled foreign corporation, but only to the extent of such portion, and subject to such proof of identity of such interest as the Secretary may prescribe by regulations).
(c) Allocation of distributions For purposes of subsections (a) and (b), section 316(a) shall be applied by applying paragraph (2) thereof, and then paragraph (1) thereof
(1) first to the aggregate of
(A) earnings and profits attributable to amounts included in gross income under section
951 (a)(1)(B) (or which would have been included except for subsection (a)(2) of this section), and
(B) earnings and profits attributable to amounts included in gross income under section
951 (a)(1)(C) (or which would have been included except for subsection (a)(3) of this section),
with any distribution being allocated between earnings and profits described in subparagraph (A) and earnings and profits described in subparagraph (B) proportionately on the basis of the respective amounts of such earnings and profits,
(2) then to earnings and profits attributable to amounts included in gross income under section
951 (a)(1)(A) (but reduced by amounts not included under subparagraph (B) or (C) of section
951 (a)(1) because of the exclusions in paragraphs (2) and (3) of subsection (a) of this section), and
(3) then to other earnings and profits.
References in this subsection to section 951 (a)(1)(C) and subsection (a)(3) shall be treated as references to such provisions as in effect on the day before the date of the enactment of the Small Business Job Protection Act of 1996.
(d) Distributions excluded from gross income not to be treated as dividends Except as provided in section
960 (a)(3), any distribution excluded from gross income under subsection (a) shall be treated, for purposes of this chapter, as a distribution which is not a dividend; except that such distributions shall immediately reduce earnings and profits.
(e) Coordination with amounts previously taxed under section 1248 For purposes of this section and section
960 (b), any amount included in the gross income of any person as a dividend by reason of subsection (a) or (f) of section 1248 shall be treated as an amount included in the gross income of such person (or, in any case to which section
1248 (e) applies, of the domestic corporation referred to in section
1248 (e)(2)) under section
951 (a)(1)(A).
(f) Allocation rules for certain inclusions
(1) In general For purposes of this section, amounts that would be included under subparagraph (B) of section
951 (a)(1) (determined without regard to this section) shall be treated as attributable first to earnings described in subsection (c)(2), and then to earnings described in subsection (c)(3).
(2) Treatment of distributions In applying this section, actual distributions shall be taken into account before amounts that would be included under section
951 (a)(1)(B) (determined without regard to this section).