The basis of property shall be the cost of the property, except as otherwise provided in Chapter 8 (commencing with Section 24451), relating to corporate distributions and adjustments, and this chapter. The cost of real property shall not include any amount in respect of real property taxes which are treated under Section 24346 as imposed on a corporation.