* TSX rises 13.94 points, or 0.11 pct, to 12,746.55 * Five of 10 main sectors advance * RBC falls 1.8 pct after results * Gold shares soar after jump in bullion price By John Tilak TORONTO, May 30 (Reuters) - Canada's main stock index edged higher on Thursday as a rise in gold mining stocks as bullion prices climbed 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 the Federal Reserve's 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. But shares of RBC dropped 1.8 percent and were the biggest negative influence on the market by far. Although RBC's second-quarter profit met expectations, there was uncertainty about future growth. The results from the country's biggest bank follow profit misses at Bank of Montreal, Bank of Nova Scotia and Toronto Dominion Bank. "You're starting to see some weakness in domestic margins," said Norman Levine, managing director at Portfolio Management Corporation, which owns shares of Scotiabank but none of the other big banks. "Banks with operations outside of Canada should do better." He is negative on the Canadian banks in general because two major growth drivers of the country's economy, natural resources and housing, have started to slow. "Their profit margins will be squeezed and their ability to increase their dividend - the way they have in the past - will be muted as well," Levine added. The Toronto Stock Exchange's S&P/TSX composite index closed up 13.94 points, or 0.11 percent, at 12,746.55. The Canadian market is up 2.5 percent since the start of the year, compared with a more than 15 percent rise in the S&P 500 . "We are decreasing our reliance on Canadian equities and increasing our reliance on non-Canadian equities, both U.S. and international," Levine said. "We see underperformance," he added. "We are positive toward equities in general, but Canadian equities will lag." Five of the 10 main sectors on the index rose. The materials sector, which includes mining stocks, gained 3.3 percent. Gold shares advanced 5 percent, soaring for a second straight day, as the price of gold rose 1.4 percent to hit a two-week high. Gold prices benefited from optimism that the central bank stimulus will not be withdrawn. Barrick Gold Corp added 6.7 percent to C$21.91, and Goldcorp Inc was up 5.1 percent to C$30.16. "Gold seems to be happy around $1,400," said Robert McWhirter, president and portfolio manager at Selective Asset Management. "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 1.5 percent to C$79.22. Energy shares declined 0.1 percent after oil prices slipped.