* TSX rises 4.89 points, or 0.04 percent, to 12,737.50 * Five of 10 main sectors advance * RBC falls nearly 2 percent after results * Gold shares climb after jump in bullion price By John Tilak TORONTO, May 30 (Reuters) - Canada's main stock index inched higher on Thursday as a surge in gold mining stocks, which followed bullion prices higher, offset a decline in Royal Bank of Canada after the lender reported quarterly results. Investors were also encouraged as limp U.S. economic data suggested U.S. central bank stimulus measures will likely remain in place for now. A drop in government spending dragged more on the U.S. economy than initially thought in the first three months of the year, and jobless claims rose in the latest week. RBC, whose second-quarter profit met expectations, dropped 1.9 percent and was the biggest negative influence on the market by far. The results follow profit misses at Bank of Montreal, Bank of Nova Scotia and Toronto Dominion Bank. The results from the lenders show that "consumers are cautious and cost pressures across all the banks have become a concern," said Robert McWhirter, president and portfolio manager at Selective Asset Management. There is no easy "cure-all" for their profit challenges, he said. The Toronto Stock Exchange's S&P/TSX composite index was up 4.89 points, or 0.04 percent, at 12,737.50. Five of the 10 main sectors on the index rose. The materials sector, which includes mining stocks, gained 2.3 percent. Gold shares advanced 3.8 percent, soaring for the second straight day, buoyed by a 1.4 percent rise in the price of the commodity. Barrick Gold Corp added 5 percent to C$21.54, and Goldcorp Inc rose 3.1 percent to C$29.59. "Gold seems to be happy around $1400," McWhirter said. "A lot of the gold stocks, from a technical analysis perspective, seem to have bottomed." However, he didn't see much upside for the group in the long term and was cautious on the space. The gold sector has lost about 33 percent since the start of the year. Financials, the index's most heavily weighted sector, were down 0.4 percent. Canadian Imperial Bank of Commerce reported an 8 percent rise in quarterly profit, due largely to lower provisions for bad loans and higher wholesale banking income. The stock fell 0.9 percent to C$79.72. Energy shares declined 0.2 percent after oil prices slipped.