(7) Recapture of gain on subsequent sale of stock (A) In general If a creditor acquires stock of a debtor corporation in satisfaction of such corporation’s indebtedness, for purposes of section 1245 — (i) such stock (and any other property the basis of which is determined in whole or in part by reference to the adjusted basis of such stock) shall be treated as section 1245 property, (ii) the aggregate amount allowed to the creditor— (I) as deductions under subsection (a) or (b) of section 166 (by reason of the worthlessness or partial worthlessness of the indebtedness), or (II) as an ordinary loss on the exchange, shall be treated as an amount allowed as a deduction for depreciation, and (iii) an exchange of such stock qualifying under section 354(a) , 355(a) , or 356(a) shall be treated as an exchange to which section 1245(b)(3) applies. The amount determined under clause (ii) shall be reduced by the amount (if any) included in the creditor’s gross income on the exchange. (B) Special rule for cash basis taxpayers In the case of any creditor who computes his taxable income under the cash receipts and disbursements method, proper adjustment shall be made in the amount taken into account under clause (ii) of subparagraph (A) for any amount which was not included in the creditor’s gross income but which would have been included in such gross income if such indebtedness had been satisfied in full. (C) Stock of parent corporation For purposes of this paragraph, stock of a corporation in control (within the meaning of section 368(c)) of the debtor corporation shall be treated as stock of the debtor corporation. (D) Treatment of successor corporation For purposes of this paragraph, the term “debtor corporation” includes a successor corporation. (E) Partnership rule Under regulations prescribed by the Secretary, rules similar to the rules of the foregoing subparagraphs of this paragraph shall apply with respect to the indebtedness of a partnership.