DATCOMをビルドする

ソースコードはここから。
www.pdas.com

gfortran11.1でコンパイルしようとしたら失敗した。gfortran6.5だとうまくいった。

$ brew install gcc@6
$ gfortran-6 -v
Using built-in specs.
COLLECT_GCC=gfortran-6
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc@6/6.5.0_6/libexec/gcc/x86_64-apple-darwin20.2.0/6.5.0/lto-wrapper
Target: x86_64-apple-darwin20.2.0
Configured with: ../configure --build=x86_64-apple-darwin20.2.0 --prefix=/usr/local/Cellar/gcc@6/6.5.0_6 --libdir=/usr/local/Cellar/gcc@6/6.5.0_6/lib/gcc/6 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-6 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew GCC 6.5.0_6' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-nls --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk SED=/usr/bin/sed
Thread model: posix
gcc version 6.5.0 (Homebrew GCC 6.5.0_6)
$ gfortran-6 datcom.f -o datcom