Currently, the decls for Fortran library procedures are inconsistent, which causes, among other things, segfaults on Darwin for ARM (PR96168). We should fix them all. For maxval, findloc and friends, I am working on a patch (see https://gcc.gnu.org/pipermail/fortran/2020-October/055170.html ). For cshift etc, we have to be more general, because we use the same routines for different types.