Unused middle-income State housing credit The second sentence of section 42(h)(3)(C) of such Code is amended by inserting , and the unused middle-income State housing credit for any calendar year is the excess (if any) of the amount described in section 42A(h)(3)(C) (after application of section 42A(h)(7)) for such State over the aggregate amount of middle-income housing credit dollar amount allocated by such State under section 42A for such year after for such year . (3) Unused middle income State housing credit included in carryover allocation Section 42(h)(3)(D)(ii) of such Code is amended— (A) by inserting the sum of after is the excess (if any) of , and (B) by inserting plus the unused middle-income State housing credit (as so defined) after as defined in subparagraph (C)(i)) . (d) Reduction in basis Section 1016(a) of the Internal Revenue Code of 1986 is amended by striking and at the end of paragraph (37), by striking the period at the end of paragraph (38) and inserting , and , and by adding at the end the following new paragraph: (39) to the extent provided in section 42A(i)(8). . (e) Conforming amendments (1) Section 55(c)(1) of the Internal Revenue Code of 1986 is amended by inserting 42A(j), before 45(e)(11)(C) . (2) Subsections (i)(3)(C), (i)(6)(B)(i), and (k)(1) of section 469 of such Code are each amended by inserting or 42A after 42 . (3) Section 772(a) of such Code is amended by redesignating paragraphs (8), (9), and (10) as paragraphs (9), (10), and (11), respectively, and by inserting after paragraph (7) the following new paragraph: (8) the middle-income housing credit determined under section 42A, . (4) The table of sections for subpart D of part IV of subchapter A of chapter 1 of such Code is amended by inserting after the item relating to section 42 the following new item: Sec. 42A. Middle-income housing credit. . (f) Effective date The amendments made by this section shall apply to taxable years ending after the date of the enactment of this Act.