BENGALURU, July 12 (Reuters) - Indian shares reversed early gains on Wednesday, dragged by information technology (IT) stocks ahead of Tata Consultancy Services and HCLTech's quarterly results, and as caution prevailed ahead of domestic and U.S. inflation data.

The Nifty 50 index was down 0.04% at 19,430.50, while the S&P BSE Sensex fell 0.05% to 65,583.41, as of 12:45 p.m. IST. Both the indexes had risen over 0.3% during the session.

Seven of the 13 major sectoral indexes logged gains, with public sector banks rising 1%.

The high weightage information technology (IT) index lost 1% and was the top sectoral loser ahead of first quarter results from Tata Consultancy Services and HCLTech, due after market hours.

Several brokerages have warned of a muted quarter for the IT sector as clients in the United States and Europe cut spending.

"The upside in markets is limited from here on because of the continuous rally," said Samrat Dasgupta, chief executive officer at Esquire Capital Investment Advisors.

"It will be good if the market consolidates for some time, especially on concerns that inflation may rise again due to uneven monsoon and rise in food prices."

The Nifty 50 and Sensex have both risen nearly 12% so far in fiscal 2024.

India's retail inflation likely snapped a four-month decline in June due to rising food prices, a Reuters poll of economists showed.

State-owned lenders Indian Bank and Union Bank rose over 4% and 2% respectively, after global brokerage Investec initiated coverage with "buy", citing valuation comfort in Tier-2 (except State Bank of India) public sector lenders.

Online gaming stocks Delta Corp, Nazara Technologies and Onmobile Global tumbled between 4% and 10%, after the government imposed a 28% tax on the turnover of online gaming companies.

Asian markets rose over 0.6% ahead of the U.S. inflation data.

(Reporting by Bharath Rajeswaran in Bengaluru; Editing by Sonia Cheema, Sohini Goswami and Nivedita Bhattacharjee)