; denial of certain expenses (1) Foreign tax credit (A) In general No credit shall be allowed under section 901 for any taxes paid or accrued (or treated as paid or accrued) with respect to the excluded portion of any dividend. (B) Denial of deduction of related tax No deduction shall be allowed under this chapter for any tax for which credit is not allowable by reason of the preceding sentence. (2) Expenses No deduction shall be allowed for expenses directly allocable to the excludable portion described in paragraph (1). (3) Excludable portion For purposes of paragraph (1), unless the taxpayer otherwise specifies, the excludable portion of any dividend or other amount is the amount which bears the same ratio to the amount of such dividend or other amount as the amount excluded from income under subsection (a) for the taxable year bears to the amount described in subsection (c)(2)(A) for such year. (4) Coordination with section 78 Section 78 shall not apply to any tax which is not allowable as a credit under section 901 by reason of this subsection. (f) Application of section This section shall apply with respect to the taxable year of the taxpayer in which the taxpayer acquires qualified infrastructure bonds at its original issue (directly or through an underwriter) under section 2(d)(5) of the Partnership to Build America Act of 2017 . . (b) Clerical amendment The table of sections for subpart F of part III of subchapter N of chapter 1 of such Code is amended by adding at the end the following new item: 966. Foreign earnings exclusion for purchase of infrastructure bonds. . (c) Effective date The amendments made by this section shall apply to dividends received for taxable years ending after the date of the enactment of this Act.