U.S. stocks posted modest losses on Tuesday after a hotter-than-expected inflation report kept a lid on any optimism sparked by a strong start to the second-quarter earnings season.