Barclays says profit hit by costs, impairments