Fortran Compilers

There are three free/open-source compilers available for Unix-like operating systems that support modern Fortran versions:

Flang is still in development and therefore less mature than GNU Fortran. For instance, there is no Unicode supported yet by Flang 5. The development of G95 seems to be frozen (last update in 2013). The compiler has been removed from the FreeBSD ports collection some time ago due to deprecated dependencies that are required for building. Several other Fortran compilers are available for Microsoft Windows and Linux. Please see the Fortran Wiki and Wikipedia for an overview.

For ancient Fortran, some compilers are open-source too:

Historic compilers for CP/M, DOS (fig. 1), and Microsoft Windows are can be downloaded from various abandonware sites, like old-dos.ru.

Microsoft FORTRAN Compiler for DOS
Fig. 1: Box of the Microsoft FORTRAN Compiler for DOS

Modern Fortran on FreeBSD

Using FreeBSD as a programming environment for modern Fortran limits the list of available compilers to Flang and GNU Fortran. Both can be obtained through the FreeBSD ports collection, for instance:

# pkg install devel/flang
# flang --version
clang version 5.0.0
Target: x86_64-portbld-freebsd11.1
Thread model: posix
InstalledDir: /usr/local/flang/bin

and

# pkg install lang/gcc7
# gfortran7 --version
GNU Fortran (FreeBSD Ports Collection) 7.2.1
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The Intel Fortran compiler for FreeBSD is not available anymore.