The powerful chip rebound anticipated in stock prices last year materialized in the quarter reported Tuesday by

Taiwan Semiconductor

(TSM) - Get Report

, which said earnings nearly doubled on a 27% surge in revenue.

But the world's largest foundry tempered its outlook for the fourth quarter and 2005, saying demand continues to be tentative as manufacturers work down an inventory glut.

TSM earned a record $830 million in the three months to Sept. 30, slightly more than expected by Wall Street thanks to a 4-percentage-point increase in net margin. The report comes about a year after the company's stock peaked above $11. It closed Monday at $7.13.

Looking at the fourth quarter, CEO Morris Chang said he expects chip shipments to decline by a percentage in the midsingle digits, citing "some near-term softening in customer demand" that most analysts have linked to a high level of inventory among big users of semiconductors.

"There is a drop in wafer shipments, and we expect shipments in the first quarter to not be very strong," Chang said.