Data showing weak US consumer buying in May took a hit on US stocks Wednesday, with consumer goods companies leading the fall of the markets.

The Dow Jones Industrial Average closed down 77.42 points (0.62 percent) at 12,496.38.

The broad-market S&P 500 lost 9.30 points (0.70 percent) to 1,314.88, while the tech-rich Nasdaq Composite slipped 24.46 (0.86 percent) to 2,818.61.

A range of popular brands took hits, with Starbucks dropping 3.3 percent, Fresh Market 2.9 percent, and Nike 5.0 percent.

May retail sales fell 0.2 percent from April, and excluding autos were down a heftier 0.4 percent, the Commerce Department reported.

"Considerable weakness is showing up on the consumer front as the May retail sales report is in line with weak job numbers, declining consumer confidence, a volatile stock market" and other factors, said Chris Christopher at IHS Global Insight.

Charles Schwab analysts said it was "a rough afternoon session, continuing a choppy week that has seen sharp moves in both directions for the major indices."

On the Dow, American Express led the losers, falling 2.4 percent.

Johnson & Johnson headed up the gainers, adding 2.2 percent, after announcing it had regulatory approval to complete its $19.7 billion acquisition of surgery equipment maker Synthes on Thursday.

Shares in blue-chip JPMorgan Chase rose 1.6 percent after chief executive Jamie Dimon received kid-glove treatment in a Senate committee hearing. He was called to testify on how the storied Wall Street investment bank lost at least $2 billion in risky bets.

Internet pioneer Yahoo! and US cable news network CNBC on Wednesday launched a new drive to provide more original content both on the Yahoo! Finance website and on the air.

Yahoo! shares fell 0.9 percent and CNBC parent Disney slipped 0.3 percent.

Dell surged 2.6 percent after the struggling computer maker announced it will start paying a dividend to investors.

Zynga added 1.3 percent. The social media games maker on Tuesday launched its "Draw Something" in China as it moved to get non-English speakers caught up in the craze for the mobile phone game based on representing words with pictures.

Bonds rallied. The yield on the 10-year Treasury bond fell to 1.60 percent from 1.66 percent Tuesday, while the 30-year bond declined to 2.71 percent from 2.77 percent.

Bond prices and yields move in opposite directions.