* TSX ends up 7.96 pts, or 0.1 pct, at 11,579.15 * Energy shares rise on higher U.S. oil * Financials gain on solid BofA earnings * Merkel comments ignite euro zone concerns By Jon Cook TORONTO, July 18 (Reuters) - Canada's main stock index eked out its fourth straight gain on Wednesday, led by energy shares, but risk sentiment was rattled after comments by German Chancellor Angela Merkel reignited worries about the euro zone debt crisis. Half of Canada's 10 main sectors finished higher, reflecting investor uncertainty about the outlook for global growth. "Canada is flat," said Pat McHugh, Canadian equity strategist at Manulife Asset Management. "We're not going to get anything moving here until we see a whiff of global growth." The heavyweight oil and gas patch kept the broader index in positive territory, rising 0.3 percent. Energy shares climbed with oil prices amid rising tensions in the Middle East and as U.S. gasoline stocks unexpectedly fell last week. The most influential gainers included: Canadian Natural Resources, up 2.8 percent at C$28.07, Suncor Energy , which rose 0.7 percent to C$30.20, and TransCanada Corp , up 1 percent at C$44.21. The influential Canadian financial sector edged up 0.2 percent, as U.S. bank earnings continued to beat expectations. The latest winner was Bank of America Corp. On Wednesday, America's second-largest bank posted second-quarter earnings of $2.5 billion, reversing a year-earlier loss. That followed recent positive results from JPMorgan Chase & Co, Wells Fargo & Co, Citigroup Inc and Goldman Sachs Group Inc. "At the end of the day the numbers have been better than expectations and that has improved the sentiment toward the financials," said Bob Gorman, chief portfolio strategist at TD Waterhouse. In Canada, financial gains were led by Toronto-Dominion Bank , up 0.6 percent to C$80.37, Bank of Nova Scotia , which rose 0.5 percent to C$52.29, and Bank of Montreal, edging up 0.3 percent to C$57.78. North American earnings outlook was also helped by second-quarter profits from U.S. bellwethers Intel and Honeywell, defying the downward trend of U.S. economic growth. The Toronto Stock Exchange's S&P/TSX composite index finished up 7.96 points, or 0.1 percent, at 11,579.15. At one point the index touched 11,615.38, its highest level since July 10. Gains were limited by losses from the heavily weighted materials sector, which slid 0.5 percent as gold fell on dampened speculation that the cooling U.S. economy would imminently require more stimulus. Declines were led by top gold miners Goldcorp Inc, which fell 3.6 percent to C$32.86, Barrick Gold, off 1.2 percent at C$34.66, and Yamana Gold, down 3.1 percent to C$14.50. Also weighing was Cogeco Cable Inc, whose shares plunged nearly 15 percent to C$37.90 after the company said on Wednesday it will pay $1.36 billion to buy U.S. cable operator Atlantic Broadband. Worries about Europe's debt crisis were also reignited following comments by Merkel, who was quoted in a media report as saying, "We have not yet shaped the European project so that we can be sure that everything will turn out well, we still have work to do." Markets were already in a nervous mood after U.S. Federal Reserve Chairman Ben Bernanke said on Tuesday that the U.S. economic recovery was being held back by anxiety over Europe's debt crisis. However on Wednesday, before a House Financial Services Committee, Bernanke moderated his tone, saying the world's top economy would experience "continued moderate growth." Bernanke's remarks were backed up by fresh data that showed U.S. housing starts rose 6.9 percent last month to a seasonally adjusted annual rate of 760,000 units, the highest rate since October 2008. "There's something for the pessimists and there's something for the optimists," said McHugh. "On the whole things are better than expected."