Barcelona saw their treble dreams dashed in an epic semi-final at San Siro.