A range-restricted GMRES algorithm