(i) thereof and by substituting a commodity described in subparagraph (A) for such a commodity in clause (ii) thereof). (f) Taxable years for which persons are treated as United States shareholders of controlled foreign corporations For purposes of this section— (1) In general A United States shareholder of a controlled foreign corporation shall be treated as a United States shareholder of such controlled foreign corporation for any taxable year of such United States shareholder if— (A) a taxable year of such controlled foreign corporation ends in or with such taxable year of such person, and (B) such person owns (within the meaning of section 958(a)) stock in such controlled foreign corporation on the last day, in such taxable year of such foreign corporation, on which the foreign corporation is a controlled foreign corporation. (2) Treatment as a controlled foreign corporation Except for purposes of paragraph (1)(B) and the application of section 951(a)(2) to this section pursuant to subsection (g), a foreign corporation shall be treated as a controlled foreign corporation for any taxable year of such foreign corporation if such foreign corporation is a controlled foreign corporation at any time during such taxable year. (g) Determination of pro rata share For purposes of this section, pro rata shares shall be determined under the rules of section 951(a)(2) in the same manner as such section applies to subpart F income. (h) Coordination with subpart F (1) Treatment as subpart F income for certain purposes Except as otherwise provided by the Secretary any foreign high return amount included in gross income under subsection (a) shall be treated in the same manner as an amount included under section 951(a)(1)(A) for purposes of applying sections 168(h)(2)(B), 535(b)(10), 851(b), 904(h)(1), 959, 961, 962, 993(a)(1)(E), 996(f)(1), 1248(b)(1), 1248(d)(1), 6501(e)(1)(C), 6654(d)(2)(D), and 6655(e)(4). (2) Entire foreign high return amount taken into account for purposes of certain sections For purposes of applying