The Indian stock market recorded gains on Tuesday, with Sensex and Nifty erasing all morning losses to sharply swing into the green as market witnessed strong volatility on first expiry day since the launch of closing auction session (CAS).Sensex gained nearly 287 points to close at 77,656 while Nifty 50 gained 115 points to end the session at 24,334 on Tuesday. Broader markets remained mixed, with Nifty Smallcap 100 closing in the red and Nifty Midcap 100 in the green.IndiGo shares jumped more than 2% to lead gains on Sensex, while Adani Ports, Infosys and Trent shares rose more than 1% each to follow. Bucking the trend, Eternal and HCLTech shares dropped nearly 1% each to lead losses on the benchmark index.Among the sectors, Nifty Pharma, Nifty PSU Bank and Nifty Consumer Durables gained nearly 1% each, while Nifty Private Bank and Nifty Metal slipped into the red. The overall market breadth however favoured the bears, with NSE seeing 1,843 declines against 1,672 advances, while 122 stocks remained unchanged.