(Adds strategist comment, updates prices to close)
* TSX ends up 35.04 points, or 0.24 percent, at 14,512.05
* Six of the TSX's 10 main groups move higher
* Materials stocks fall 1 pct, energy group gains 2.2 pct
By Alastair Sharp
TORONTO, Aug 3 (Reuters) - Canada's main stock index gained on Wednesday as shares in energy companies benefited from a rebound in oil prices, offsetting losses among gold miners and other materials stocks.
Oil prices jumped more than 3 percent after a surprisingly strong drawdown in gasoline stockpiles, pushing the U.S. benchmark CLc1 back above $40 a barrel after falling from $50 in late June. O/R
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE ended the session up 35.04 points, or 0.24 percent, at 14,512.05.
Its energy group, a major component, climbed 2.2 percent.
"We think it's the shorts that are driving the (oil) market lower," said Philip Petursson, chief investment strategist at Manulife Investments, referring to speculative bets that oil prices will fall. "Equity investors are looking through that to perhaps rising oil prices through the end of this year."
Suncor Energy Inc SU.TO gained 1.5 percent to C$34.56 and Canadian Natural Resources Ltd CNQ.TO rose 1.7 percent to C$39.43.
Husky Energy Inc HSE.TO advanced 6.9 percent to C$16.24. The company said it had reached agreement with China's CNOOC 0883.HK over a gas project. materials group, which includes precious and base metals miners and fertilizer companies, lost 1 percent as the price of bullion XAU= fell from a three-week high hit in the previous session.
The most influential weights included Barrick Gold Corp ABX.TO , down 1.4 percent to C$29.32 and Kinross Gold Corp K.TO , off 1.9 percent at C$7.09.
The sector has in recent months helped to lessen the impact on the Canadian market of global shocks, including Britain's vote to leave the European Union, as investors back gold miners amid economic uncertainty.
Turquoise Hill Resources Ltd TRQ.TO fell 6.6 percent to C$4.25 after announcing quarterly results late on Tuesday. of the index's 10 main groups were in positive territory, with gainers just outnumbering decliners.
Consumer staples rose 0.4 percent as dairy company Saputo Inc SAP.TO jumped 5.3 percent to C$41.84. Several analysts raised their price targets for the company's shares after it reported a profit jump, boosted its dividend, and said it remains interested in acquisitions. in Shopify Inc SH.TO surged 9.3 percent to C$48.01 after the e-commerce software maker reported a smaller-than-expected quarterly loss and provided a more upbeat outlook.