No deduction shall be allowed under subsection (a) for any expense for which a deduction is allowed to the taxpayer under any other provision of this chapter.
The total amount of qualified tuition and related expenses shall be reduced by the amount of such expenses taken into account in determining any amount excluded under section 135, 529(c)(1), or 530(d)(2). For purposes of the preceding sentence, the amount taken into account in determining the amount excluded under section 529(c)(1) shall not include that portion of the distribution which represents a return of any contributions to the plan.
The receipt of the statement referred to in subparagraph (A) by an individual described in subsection (c)(3) shall be treated for purposes of subparagraph (A) as received by the taxpayer.
The Secretary may prescribe such regulations as may be necessary or appropriate to carry out this section, including regulations requiring recordkeeping and information reporting.
This section shall not apply to taxable years beginning after December 31, 2017.