I know you can amortize bond premiums on your US tax return. You can keep deducting the amortized amount every year till maturity. However, if you decide to sell the bond before maturity and have been deducting the amortized amount, do you have to report those deductions as gain after selling the bond?
When you deduct the amortized amount, you reduce your basis by the same amount, so it will increase your capital gain/reduce capital loss. Last sentence on the first paragraph of the document you linked explains briefly.