TORONTO (Reuters) - Goldcorp Inc (>> Goldcorp Inc.) shares tumbled almost 9 percent on Thursday while stocks for several top gold miners made gains, after the world's most valuable bullion producer posted a surprise loss on an inventory writedown and declining prices.

The Vancouver-based company was overshadowed by better quarterly results from the world's largest gold producer, Barrick (>> Barrick Gold Corp.), whose stock rose 3.3 percent; Newmont (>> Newmont Mining Corp), up 3.9 percent; and Agnico-Eagle (>> Agnico Eagle Mines Ltd), whose shares rose 2.7 percent.

"When companies are delivering good results, their share prices are reflecting it," said Dundee Capital Markets mining analyst Josh Wolfson. "Investors are looking for tangible results."

Goldcorp reported an adjusted loss of $37 million, or 4 cents a share, which included a writedown on stockpiles of $40 million, or 5 cents a share.

Analysts, on average, expected Goldcorp to earn an adjusted profit of 4 cents a share, according to Thomson Reuters I/B/E/S.

Analysts flagged a new problem with iron sulphides at the Eleonore mine, which impacted third-quarter recoveries and could hurt production. Last month, Goldcorp trimmed the mine's full-year output estimate due to lower gold grades from unexpected folds and faults in the ore body.

Wolfson said free cash flow was weaker than he expected and he noted the removal of a fourth-quarter production timeline target at the Cochenour mine.

Goldcorp Chief Executive Chuck Jeannes said the market is overreacting to headline numbers that mask strong results.

"I absolutely think it's overdone. I'm always surprised by how one day, a quarter of the market cares so much about GAAP (generally accepted accounting principles) earnings and whether there's a miss or not," he said in an interview.

"The operations performed extremely well, we grew production, our cash all-in-sustaining costs were down, we generated $243 million of free cash flow, paid down debt, put money in the bank. All the things that you're supposed to do."

Goldcorp confirmed its 2015 forecast for production at the high end of a range between 3.3 million and 3.6 million ounces of gold, all-in sustaining costs of $850 to $900 an ounce and capital spending of $1.2 billion to $1.4 billion.

All-in sustaining costs to produce an ounce of gold fell to $848 in the quarter, from $1,066 last year. Gold production increased to a record 922,200 ounces from 651,700, but the average realized price fell to $1,114 per ounce from $1,266 ounce.

(Reporting by Susan Taylor; Editing by Jeffrey Benkoe and Alan Crosby)