Contract chip maker Chartered Semiconductor Manufacturing swung to a quarterly profit after a tax credit, but forecast a third-quarter net loss on higher costs, sending its stock down as much as 6.5 percent.

Singapore-based Chartered forecast a net loss of $24-$34 million for July-September, citing increased electricity charges and rising prices for supplies like chemicals and process gases.