B&M has issued a profit warning after trading was hit by an “uncertain economic outlook”, as it also said its chief executive will retire in the coming months.