(REUTERS) -- AT&T Inc. posted a massive quarterly loss due to a break-up fee for its failed T-Mobile USA merger and a pension-related charge on top of costly subsidies for smartphones such as Apple Inc.'s popular iPhone.

As a result, the telephone company posted a loss of $6.68 billion or $1.12 per share, compared with a profit of $1.09 billion, or 18 cents per share in the year ago quarter.

Revenue rose to $32.5 billion from $31.36 billion and compared with Wall Street expectations for $31.95 billion, according to Thomson Reuters I/B/E/S.

The No. 2 U.S. mobile provider said it added 717,000 subscribers in the quarter, beating the average expectation for 570,000 from seven analysts.

AT&T had to scrap its plans for a purchase of Deutsche Telekom's T-Mobile USA in December after regulatory opposition.