(Recasts with fall after oil inventory data)
* TSX down 50.2 points, or 0.35 percent, at 14,499.80
* Six of the TSX's 10 main groups move lower
TORONTO, July 27 (Reuters) - Canada's main stock index reversed course on Wednesday, turning lower as slumping oil prices hit energy shares, offsetting gains for gold miners and companies that reported stronger-than-expected results.
Oil prices fell more than 2 percent, hitting a two-month low, after the U.S. government reported a surprise build in crude and gasoline inventories during the peak summer driving season.
The heavyweight energy group, which had been trading higher before the inventory report was released, fell 1.4 percent, with Suncor Energy Inc down 1 percent at C$34.67 and Cenovus Energy Inc losing 3.3 percent to C$17.46.
At 12:03 p.m. EDT (1603 GMT), the Toronto Stock Exchange's S&P/TSX composite index was down 50.2 points, or 0.35 percent, at 14,499.80.
Six of the index's 10 main groups were in negative territory, with decliners outnumbering advancers by a ratio of 1.3-to-1.
The most influential gainers included grocery chain Loblaw Cos Ltd, which rose 2.8 percent to C$72.82, and technology company CGI Group Inc, which advanced 4.4 percent to C$61.37, after both beat earnings expectations.
But Toronto Star publisher Torstar Corp fell 4.2 percent to C$1.59 after reporting a wider loss and cutting its dividend.
The materials group, which includes precious and base metals miners and fertilizer companies, added 0.4 percent.
Barrick Gold Corp advanced 1.3 percent to C$27.31, while Yamana Gold Inc gained 3.3 percent to C$7.43.
Gold steadied near $1,320 an ounce ahead of the outcome of a two-day Federal Reserve policy meeting, which will be watched for any clues on the scale and pace of U.S. interest rate hikes this year.
Alaris Royalty Corp slumped 11.3 percent to C$26.03 after sharply missing earnings expectations and providing a weaker-than-expected outlook after markets closed on Tuesday.
Gildan Activewear Inc fell 5.8 percent to C$39.14 after reporting results and a weaker-than-expected outlook. (Reporting by Alastair Sharp; Editing by Jeffrey Hodgson and James Dalgleish)