For Bank of America Corp, the mortgage issues never seem to end, which is the chief worry for investors and analysts.

The largest U.S. bank is due to post second-quarter earnings on Tuesday, and is expected to record more than $20 billion of charges linked to home loans.

If that were the last of the bank's mortgage issues, investors would look past the charges. But investors are not confident the bank's housing-related issues are ending.

So far this year, BofA has entered into three major settlements totaling $13 billion with outside investors who claimed the bank needed to repurchase toxic home loans that were part of mortgage-backed securities.

But after the settlement agreements, the bank is still on the hook for buying back billions in bad mortgages.

That signals to some analysts that the bank is limiting some of its possible liabilities from bad mortgages, only to find new ones cropping up.

They have to make clear they're moving past these issues, said Marty Mosby, bank analyst with Guggenheim Securities LLC.

Earlier this year, the bank estimated it may have to repurchase between $7 billion and $10 billion in soured mortgages out of securities held by private investors. The bank then entered a settlement with U.S. government-backed mortgage investors Fannie Mae and Freddie Mac, and another with insurer Assured Guaranty.

But when the bank reported first-quarter results in April, its estimate of buybacks did not shrink. Then-CFO Charles Noski attributed the lack of shrinking to the continued decline in U.S. home prices, which offset any gains the bank made in resolving claims.

The bank has said to expect a second-quarter loss of up to $9.1 billion due to settlement-related charges.

Excluding the charges, Bank of America said it expected to report net income of up to $3.7 billion.

Analysts project the bank will lose 90 cents per share in the second quarter, reversing a 27 cents per share profit from a year earlier. Beyond its mortgage issues, BofA's other operations will have to show they're keeping pace with second-quarter results at the lender's chief rivals.

BofA reports results less than a week after JPMorgan Chase & Co and Citigroup Inc posted better-than-expected second-quarter profits.

Both showed fewer problem loans, and had uneven investment banking results. BofA is expected to largely follow in those banks' footsteps. On June 29, BofA said sales and trading results should be above a year ago, but lag first quarter 2011. BofA's global banking and markets unit -- which includes its Bank of America Merrill Lynch investment bank -- earned $2.1 billion in the first quarter. On Thursday, JPMorgan Chase's investment bank's results mirrored those of BofA's outlook. JPMorgan's investment bank posted net income of $2.06 billion, above second quarter 2010's $1.38 billion, but below the $2.37 billion in first quarter.

BofA, like its peers, is also expected to benefit from releasing money that had been previously set aside to cover bad loans.

At Citigroup, the third largest U.S. bank by assets released $1.9 billion in loan loss reserves, a 31 percent jump from a year prior. The release contributed to the bank's $3.3 billion in second-quarter net income.

(Reporting by Joe Rauch, editing by Bernard Orr)