For purposes of this subchapter, the term “nonseparately computed income or loss” means gross income minus the deductions allowed to the corporation under this chapter, determined by excluding all items described in paragraph (1)(A).
The character of any item included in a shareholder’s pro rata share under paragraph (1) of subsection (a) shall be determined as if such item were realized directly from the source from which realized by the corporation, or incurred in the same manner as incurred by the corporation.
In any case where it is necessary to determine the gross income of a shareholder for purposes of this title, such gross income shall include the shareholder’s pro rata share of the gross income of the corporation.
Except as provided in subparagraph (B), any loss or deduction which is disallowed for any taxable year by reason of paragraph (1) shall be treated as incurred by the corporation in the succeeding taxable year with respect to that shareholder.
In the case of any transfer described in section 1041(a) of stock of an S corporation, any loss or deduction described in subparagraph (A) with respect such stock shall be treated as incurred by the corporation in the succeeding taxable year with respect to the transferee.
If for the last taxable year of a corporation for which it was an S corporation a loss or deduction was disallowed by reason of paragraph (1), such loss or deduction shall be treated as incurred by the shareholder on the last day of any post-termination transition period.
The aggregate amount of losses and deductions taken into account by a shareholder under subparagraph (A) shall not exceed the adjusted basis of the shareholder’s stock in the corporation (determined at the close of the last day of the post-termination transition period and without regard to this paragraph).
The shareholder’s basis in the stock of the corporation shall be reduced by the amount allowed as a deduction by reason of this paragraph.
To the extent that any increase in adjusted basis described in subparagraph (B) would have increased the shareholder’s amount at risk under section 465 if such increase had occurred on the day preceding the commencement of the post-termination transition period, rules similar to the rules described in subparagraphs (A) through (C) shall apply to any losses disallowed by reason of section 465(a).
If an individual who is a member of the family (within the meaning of section 704(e)(2) of one or more shareholders of an S corporation renders services for the corporation or furnishes capital to the corporation without receiving reasonable compensation therefor, the Secretary shall make such adjustments in the items taken into account by such individual and such shareholders as may be necessary in order to reflect the value of such services or capital.
Subsection (a) shall not apply with respect to any credit allowable under section 34 (relating to certain uses of gasoline and special fuels).
If any tax is imposed under section 1374 for any taxable year on an S corporation, for purposes of subsection (a), the amount so imposed shall be treated as a loss sustained by the S corporation during such taxable year. The character of such loss shall be determined by allocating the loss proportionately among the recognized built-in gains giving rise to such tax.