Pharmaceutical giant AstraZeneca has warned earnings will come in at the lower end of expectations after it took a $381.5m hit from failed drug tests.The company has stopped development of its ovarian cancer treatment olaparib and also said its antidepressant compound TC-5214 had not met targets.As a result, AstraZeneca will take pre-tax impairment charges totalling $381.5m to R&D expense in the fourth quarter of 2011, it said. These impairments would push down the company's core earnings per share by around $0.21 in the fourth quarter, it said.This meant that while full year core EPS would remain in the predicted range of $7.20 to $7.40, earnings were likely to be in the lower half of this scale.The company is taking an impairment of $285m pre-tax charge due to the failure of olaparib, with a further $96.5m hit based on the lower probability of success for the remaining TC-5214 studies.Shares in AstraZeneca fell 2% in early trading following the announcement.