In /usr/bin/mpifort.mpich line 31:
prefix=/usr
^----^ SC2034: prefix appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 32:
exec_prefix=/usr
^---------^ SC2034: exec_prefix appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 61:
wl="-Wl,"
^-- SC2034: wl appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 64:
libext="a"
^----^ SC2034: libext appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 67:
shlibext="so"
^------^ SC2034: shlibext appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 70:
libname_spec="lib\$name"
^----------^ SC2034: libname_spec appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 73:
library_names_spec="\$libname\$shrext"
^----------------^ SC2034: library_names_spec appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 80:
hardcode_libdir_separator=""
^-----------------------^ SC2034: hardcode_libdir_separator appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 84:
hardcode_direct="no"
^-------------^ SC2034: hardcode_direct appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 88:
hardcode_minus_L="no"
^--------------^ SC2034: hardcode_minus_L appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 109:
    MPICH_FC_OLD="$FC"
    ^----------^ SC2034: MPICH_FC_OLD appears unused. Verify use (or export if used externally).


In /usr/bin/mpifort.mpich line 111:
    FCname=`echo $FC | sed 's/ /-/g'`
           ^------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
            ^----------------------^ SC2001: See if you can use ${variable//search/replace} instead.
                 ^-^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    FCname=$(echo "$FC" | sed 's/ /-/g')


In /usr/bin/mpifort.mpich line 112:
    if [ -s $sysconfdir/mpifort-$FCname.conf ] ; then
                                ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ -s $sysconfdir/mpifort-"$FCname".conf ] ; then


In /usr/bin/mpifort.mpich line 113:
        . $sysconfdir/mpifort-$FCname.conf
          ^-- SC1090: Can't follow non-constant source. Use a directive to specify location.
                              ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        . $sysconfdir/mpifort-"$FCname".conf


In /usr/bin/mpifort.mpich line 163:
    -fc=*)
    ^---^ SC2221: This pattern always overrides a later one on line 167.


In /usr/bin/mpifort.mpich line 164:
    FC=`echo A$arg | sed -e 's/A-fc=//g'`
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
              ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    FC=$(echo A"$arg" | sed -e 's/A-fc=//g')


In /usr/bin/mpifort.mpich line 167:
    -fc=*)
    ^---^ SC2222: This pattern never matches because of a previous pattern on line 163.


In /usr/bin/mpifort.mpich line 168:
    FC=`echo A$arg | sed -e 's/A-fc=//g'`
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
              ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    FC=$(echo A"$arg" | sed -e 's/A-fc=//g')


In /usr/bin/mpifort.mpich line 173:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpifort.mpich line 177:
    FCname=`echo A$arg | sed -e 's/A-config=//g'`
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    FCname=$(echo A"$arg" | sed -e 's/A-config=//g')


In /usr/bin/mpifort.mpich line 179:
        . "$sysconfdir/mpifort-$FCname.conf"
          ^-- SC1090: Can't follow non-constant source. Use a directive to specify location.


In /usr/bin/mpifort.mpich line 186:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpifort.mpich line 191:
    Show=echo
    ^--^ SC2209: Use var=$(command) to assign output (or quote to assign string).


In /usr/bin/mpifort.mpich line 206:
    profConf=`echo A$arg | sed -e 's/A-profile=//g'`
             ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                    ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    profConf=$(echo A"$arg" | sed -e 's/A-profile=//g')


In /usr/bin/mpifort.mpich line 216:
    NC=`echo "$FC" | sed 's%\/% %g' | awk '{print $NF}' -`
    ^-- SC2034: NC appears unused. Verify use (or export if used externally).
       ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    NC=$(echo "$FC" | sed 's%\/% %g' | awk '{print $NF}' -)


In /usr/bin/mpifort.mpich line 218:
        . $sysconfdir/mpixxx_opts.conf
          ^--------------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location.


In /usr/bin/mpifort.mpich line 222:
            . ./mpixxx_opts.conf
              ^----------------^ SC1091: Not following: ./mpixxx_opts.conf was not specified as input (see shellcheck -x).


In /usr/bin/mpifort.mpich line 253:
	$ext=`expr "$arg" : '.*\(\..*\)'`
         ^-- SC1066: Don't use $ on the left side of assignments.
             ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	$ext=$(expr "$arg" : '.*\(\..*\)')


In /usr/bin/mpifort.mpich line 254:
        bfile=`basename $arg $ext`
              ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                        ^--^ SC2086: Double quote to prevent globbing and word splitting.
                             ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        bfile=$(basename "$arg" "$ext")


In /usr/bin/mpifort.mpich line 259:
        if $FCCPP "${cppflags[@]}" $arg > $tmpfile ; then
                                   ^--^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        if $FCCPP "${cppflags[@]}" "$arg" > "$tmpfile" ; then


In /usr/bin/mpifort.mpich line 261:
	    count=`expr $count + 1`
                  ^---------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                   ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
                        ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	    count=$(expr "$count" + 1)


In /usr/bin/mpifort.mpich line 276:
        unset allargs[$argno]
              ^-------------^ SC2184: Quote arguments to unset so they're not glob expanded.


In /usr/bin/mpifort.mpich line 279:
    argno=`expr $argno + 1`
          ^---------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
           ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].

Did you mean: 
    argno=$(expr $argno + 1)


In /usr/bin/mpifort.mpich line 302:
    if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
                                     ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /usr/bin/mpifort.mpich line 311:
    if [ -n "$profConffile" -a -s "$profConffile" ] ; then
                            ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.


In /usr/bin/mpifort.mpich line 312:
	. $profConffile
          ^-----------^ SC1090: Can't follow non-constant source. Use a directive to specify location.
          ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	. "$profConffile"


In /usr/bin/mpifort.mpich line 324:
	trap "$Show rm -f mpif.h" 0
              ^---^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.


In /usr/bin/mpifort.mpich line 339:
    newarg=`echo A"$FCMODINCSPEC" | \
           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
    newarg=$(echo A"$FCMODINCSPEC" | \
	sed -e 's/^A//' -e 's%<dir>%'"$includedir%g" -e 's/<file>/mpi/g')


In /usr/bin/mpifort.mpich line 366:
        eval rpath_flags=\"${hardcode_libdir_flag_spec}\"
                           ^--------------------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        eval rpath_flags=\""${hardcode_libdir_flag_spec}"\"


In /usr/bin/mpifort.mpich line 372:
        $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}"
              ^-^ SC2086: Double quote to prevent globbing and word splitting.
                  ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                    ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                     ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        $Show "$FC" "$PROFILE_INCPATHS" "${final_fcflags}" "${final_ldflags}" "${allargs[@]}"


In /usr/bin/mpifort.mpich line 376:
          $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -lmpichfort $PROFILE_PRELIB $PROFILE_FOO $rpath_flags -lmpich  $PROFILE_POSTLIB ${final_libs} 
                ^-^ SC2086: Double quote to prevent globbing and word splitting.
                    ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                       ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                    ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                    ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                 ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                       ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                        ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
          $Show "$FC" "$PROFILE_INCPATHS" "${final_fcflags}" "${final_ldflags}" "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -lmpichfort "$PROFILE_PRELIB" "$PROFILE_FOO" "$rpath_flags" -lmpich  "$PROFILE_POSTLIB" "${final_libs}" 


In /usr/bin/mpifort.mpich line 379:
          if [ "" = yes ] ; then
                  ^-- SC2050: This expression is constant. Did you forget the $ on a variable?


In /usr/bin/mpifort.mpich line 380:
              fabric_dep=`pkg-config --static --libs $libdir/pkgconfig/libfabric.pc`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs $libdir/pkgconfig/libfabric.pc)


In /usr/bin/mpifort.mpich line 381:
              fabric_dep=`echo $fabric_dep | sed 's/-lfabric//'`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^-- SC2001: See if you can use ${variable//search/replace} instead.
                               ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
              fabric_dep=$(echo "$fabric_dep" | sed 's/-lfabric//')


In /usr/bin/mpifort.mpich line 383:
              fabric_dep=`pkg-config --static --libs yes/lib/pkgconfig/libfabric.pc`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs yes/lib/pkgconfig/libfabric.pc)


In /usr/bin/mpifort.mpich line 385:
              fabric_dep=`pkg-config --static --libs libfabric`
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
              fabric_dep=$(pkg-config --static --libs libfabric)


In /usr/bin/mpifort.mpich line 387:
          $Show $FC $PROFILE_INCPATHS ${final_fcflags} ${final_ldflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -lmpichfort $PROFILE_PRELIB $PROFILE_FOO $rpath_flags $libdir/libmpi.a  $PROFILE_POSTLIB ${final_libs}  ${fabric_dep}
                ^-^ SC2086: Double quote to prevent globbing and word splitting.
                    ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                       ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                    ^-------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                    ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                 ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                                 ^-----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                                                                                                                                                                                ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
          $Show "$FC" "$PROFILE_INCPATHS" "${final_fcflags}" "${final_ldflags}" "${allargs[@]}" $FCINCDIRS $FCMODDIRS -L$libdir -lmpichfort "$PROFILE_PRELIB" "$PROFILE_FOO" "$rpath_flags" $libdir/libmpi.a  "$PROFILE_POSTLIB" "${final_libs}"  "${fabric_dep}"


In /usr/bin/mpifort.mpich line 392:
    $Show $FC $PROFILE_INCPATHS ${final_fcflags} "${allargs[@]}" $FCINCDIRS $FCMODDIRS
          ^-^ SC2086: Double quote to prevent globbing and word splitting.
              ^---------------^ SC2086: Double quote to prevent globbing and word splitting.
                                ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    $Show "$FC" "$PROFILE_INCPATHS" "${final_fcflags}" "${allargs[@]}" $FCINCDIRS $FCMODDIRS


In /usr/bin/mpifort.mpich line 397:
        objfile=`basename $file .f`
                ^-----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        objfile=$(basename "$file" .f)


In /usr/bin/mpifort.mpich line 400:
	    destfile=`echo $objfile | sed -e "s/.*$$-//"`
                     ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-- SC2001: See if you can use ${variable//search/replace} instead.
                           ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	    destfile=$(echo "$objfile" | sed -e "s/.*$$-//")


In /usr/bin/mpifort.mpich line 401:
	    mv -f ${objfile}.o ${destfile}.o
                  ^--------^ SC2086: Double quote to prevent globbing and word splitting.
                               ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	    mv -f "${objfile}".o "${destfile}".o


In /usr/bin/mpifort.mpich line 403:
        rm -f $file
              ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        rm -f "$file"


In /usr/bin/mpifort.mpich line 405:
    rm -f $rmfiles
          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    rm -f "$rmfiles"

For more information:
  https://www.shellcheck.net/wiki/SC1066 -- Don't use $ on the left side of a...
  https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source....
  https://www.shellcheck.net/wiki/SC2034 -- MPICH_FC_OLD appears unused. Veri...