The refactored j/i/k tridiagonal solvers of MOM_vert_friction.F90 show a regression in vertvisc_remnant() if built with -O2 but without -fp-model source (or similar FP model).
Answers are restored if we explicitly initialize visc_rem_[uv](:,:,:) to zero, including over land.
Formally this should not be needed, since we mask all visc_rem_[uv] values over land. But there must be either something wrong with this statement, or we have an aggressive optimizer that found a loophole that we missed.
This is not urgent, since we all build with -fp-model, but we may want to investigate further if we are interested in pursuing more optimizations without -fp-model.
Relevant PR:
#973