Differences between revisions 88 and 89
Revision 88 as of 2018-08-22 06:51:36
Size: 46356
Comment: Mention MIN/MAX behavior wrt NaN
Revision 89 as of 2018-10-21 19:09:13
Size: 46356
Editor: ThomasKoenig
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
/!\ Please remember not only to update this list, but also [[Fortran2003]], Fortran2003Status, Fortran2008Status, the [[https://gcc.gnu.org/gcc-8/changes.html|GCC 8 Changelog]] and the [[https://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-and-2008-status.html|GNU Fortran manual]] /!\ Please remember not only to update this list, but also [[Fortran2003]], Fortran2003Status, Fortran2008Status, the [[https://gcc.gnu.org/gcc-9/changes.html|GCC 9 Changelog]] and the [[https://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-and-2008-status.html|GNU Fortran manual]]

What's new in gfortran?

/!\ Please remember not only to update this list, but also Fortran2003, Fortran2003Status, Fortran2008Status, the GCC 9 Changelog and the GNU Fortran manual

gfortran 9 (current development version)

GCC 9 releases, GCC 9 release notes, documentation

  • Fortran 2003

    • Asynchronous I/O is now fully supported; a program needs to be linked against the pthreads library in order to use it.

  • Fortran 2008

    • The BACK argument for MINLOC and MAXLOC has been implemented.

  • The MAX and MIN intrinsics are no longer guaranteed to return any particular value in case one of the arguments is a NaN. Note that this conforms to the Fortran standard and to what other Fortran compilers do. If there is a need to handle that case in some specific way, one needs to explicitly check for NaN's before calling MAX or MIN, e.g. by using the IEEE_IS_NAN function from the intrinsic module IEEE_ARITHMETIC.

gfortran 8

GCC 8 releases, GCC 8 release notes, documentation

  • Fortran 2003

    • Parameterized derived types are now supported.

    • Transformational intrinsics are now fully supported in initialization expressions.
  • Fortran 2008

    • The maximum rank for arrays has been increased to 15.
  • Fortran 2018

    • TS18508: Partial support is provided for teams, which are hierarchical subsets of images that execute independently of other image subsets.

  • A new flag -fc-prototypes writes C function prototypes of BIND(C) variables and procedures to standard output.

  • -Ofast now honors -fmax-stack-var-size.

  • New flags -fdefault-real-16 and -fdefault-real-10 to control the default kind of REAL variables.

  • A warning is now issued if an array subscript inside a DO loop could lead to an out-of-bounds-access. The new option -Wdo-subscript, enabled by `-Wextra', warns about this even if the compiler can not prove that the code will be executed.

  • The Fortran front end now attempts to interchange loops if it is deemed profitable. So far, this is restricted to FORALL' and DO CONCURRENT' statements with multiple indices. This behavior is controlled with the new flag -ffrontend-loop-interchange, which is enabled with optimization by default. The -Wfrontend-loop-interchange option warns about such occurrences.

  • OPEN and INQUIRE now accept 64-bit integers as arguments to RECL=, making records > 2 GiB possible.

  • The GFORTRAN_DEFAULT_RECL environment variable no longer has any effect. The record length of preconnected units and sequential access units without an explicit RECL= specifier is now a very large value, larger than any practical limit.

  • Character lengths are now 64-bit on 64-bit targets. Note that this also changes the procedure call ABI.
  • A new flag -std=f2018 is available.

gfortran 7

GCC 7 releases, GCC 7 release notes, documentation

  • The RANDOM_NUMBER algorithm has been replaced, and now has per-thread state allowing scalable random number generation in multi-threaded programs.

  • Fortran 2003

    • User Defined Derived-Type IO: DTIO is now fully supported.

  • Fortran 2018

    • Non-constant stop codes and error stop codes
    • TS18508: Support for failed images

  • Support for a number of extensions for compatibility with legacy code with new flags:

    • -fdec-structure: Support for DEC STRUCTURE and UNION

    • -fdec-intrinsic-ints: Support for new integer intrinsics with B/I/J/K prefixes such as BABS, JIAND

    • -fdec-math: Support for additional math intrinsics, including COTAN and degree-valued trigonometric functions such as TAND, ASIND

    • -fdec: Enable the -fdec-* family of extensions.

  • New flag -finit-derived to allow default initialization of derived-type variables.

gfortran 6

GCC 6 releases, GCC 6 release notes, documentation

  • The MATMUL intrinsic is now inlined for straightforward cases if front-end optimization is active. The maximum size for inlining can be set to n with the -finline-matmul-limit=n option and turned off with -finline-matmul-limit=0.

  • The -Wconversion-extra option will warn about REAL constants which have excess precision for their kind.

  • The -Winteger-division option has been added, which warns about divisions of integer constants which are truncated. This option is included in -Wall by default.

  • Fortran 2008

    • Submodules: Submodules are now fully supported.

  • Fortran 2018

    • TS18508: Event support (event post, event wait and event_query) has been added for lock-free synchronization

gfortran 5

5 releases, 5 release notes, documentation

  • Compatibility notice

    • Module files: The version of the module files (.mod) has been incremented.

    • For free-form source files, -Werror=line-truncation is now enabled by default; note that comments exceeding the line length are not diagnosed. For fixed-form source code, the same warning is available but turned off by default, such that excess characters are ignored. (-ffree-line-length-n and -ffixed-line-length-n can be used to modify the default line length of 132 and 72 columns, respectively.)

    • The -Wtabs option is now more sensible: with -Wtabs the compiler warns if it encounters tabs and with -Wno-tabs this warning is turned off. Before, -Wno-tabs warned and -Wtabs turned off the warning. As before, the warning is also enabled via -Wall, -pedantic and the f95, f2003, f2008 and f2008ts options of -std=.

  • OpenMP 4.0 is now also fully implemented in gfortran (this feature has been backported to GCC 4.9.1, except for actual offloading).

  • Experimental offloading support for OpenMP

  • New but still incomplete support for colorizing diagnostics emitted by GCC has been added. Using -fdiagnostics-color=auto will enable it when outputting to terminals, -fdiagnostics-color=always unconditionally. The GCC_COLORS environment variable can be used to customize the colors or disable coloring. The default value depends on how GCC was configured (--with-diagnostics-color with default auto).

  • The -Wuse-without-only option has been added to warn if a USE statement has no ONLY qualifier and, thus, implicitly imports all public entities of the used module.

  • Formatted READ and WRITE statements now work correctly in locale-aware programs. For more information and potential caveats, see Section 5.3 Thread-safety of the runtime library in the manual.

  • Fortran 2003

    • The intrinsic IEEE modules (IEEE_FEATURES, IEEE_EXCEPTIONS and IEEE_ARITHMETIC) are now supported.

  • Fortran 2008

    • Coarrays: Usage of coindexed coarrays now invokes the communication library. However, allocatable/pointer components of coindexed coarrays are not yet supported. GCC currently only ships with a single-image library (libcaf_single), but mult-image support based on MPI and GASNet is provided by the libraries of the OpenCoarrays project.

  • Fortran 2018

    • TS18508 Additional Parallel Features in Fortran

      • Experimental support for the collective intrinsic subroutines CO_MAX, CO_MIN, CO_SUM, CO_REDUCE and CO_BROADCAST has been added, including -fcoarray=lib support.

      • Support for the new atomic intrinsics has been added, including -fcoarray=lib support.

    • Support for IMPLICIT NONE (external, type).

    • ERROR STOP is now permitted in pure procedures.

gfortran 4.9

4.9 releases, 4.9 release notes, documentation

  • Compatibility notice

    • Module files: The version of the module files (.mod) has been incremented; additionally, module files are now compressed. Fortran MODULEs compiled by earlier GCC versions have to be recompiled, when they are USEd by files compiled with GCC 4.9, because GCC 4.9 is not able to read .mod file of earlier GCC versions; attempting to do so gives an error message. Note: The ABI of the produced assembler data itself has not changed: object files and libraries are fully compatible to older versions. (Except for the next items.)

    • ABI changes:
      • Note that the argument passing has changed for scalar dummy arguments of type INTEGER, REAL, COMPLEX and LOGICAL, which have both the VALUE and the OPTIONAL attribute.

      • Due to the support of finalization, the virtual table associated with polymorphic variables has changed. Therefore, code containing CLASS should be recompiled, including all files which define derived types involved in the type definition used by polymorphic variables. (Note: Due to the incremented module version, trying to mix old code with new code will usually give an error message.)
    • GNU Fortran no longer deallocates allocatable variables or allocatable components of variables declared in the main program. The Fortran standard states since 2008 explicitly that variables declared in the Fortran main program automatically have the SAVE attribute.

    • When opening files, the close-on-exec flag is set if the system supports such a feature. This is generally considered good practice these days, but if there is a need to pass file descriptors to child processes the parent process must now remember to clear the close-on-exec flag by calling fcntl(), e.g. via ISO_C_BINDING, before executing the child process.
  • The deprecated command-line option -fno-whole-file has been removed. (-fwhole-file is the default since GCC 4.6.) -fwhole-file/-fno-whole-file continue to be accepted but do not influence the code generation.

  • The compiler no longer unconditionally warns about DO loops with zero iterations. This warning is now controlled by the -Wzerotrips option, which is implied by -Wall.

  • The new NO_ARG_CHECK attribute of the !GCC$ directive can be used to disable the type-kind-rank (TKR) argument check for a dummy argument. The feature is similar to ISO/IEC TS 29133:2012's TYPE(*), except that it additionally also disables the rank check. Variables with NO_ARG_CHECK have to be dummy arguments and may only be used as argument to ISO_C_BINDING's C_LOC and as actual argument to another NO_ARG_CHECK dummy argument; also the other constraints of TYPE(*) apply. The dummy arguments should be declared as scalar or assumed-size variable of type type(*) (recommended) - or of type integer, real, complex or logical. With NO_ARG_CHECK, a pointer to the data without further type or shape information is passed, similar to C's void*. Note that also TS29113's type(*),dimension(..) accepts arguments of any type and rank; contrary to NO_ARG_CHECK assumed-rank arguments pass an array descriptor which contains the array shape and stride of the argument.

  • Partial support for OpenMP 4.0: The features provides by the libgomp library are available, but no new directives are supported in Fortran. (Currently, they are only available in C and C++. For the latter, omp target and omp declare simd is supported but runs without offloading/vectorized version on the host.)

  • Fortran 2003

    • Finalization is now supported. Note that finalization is currently only done for a subset of the situations in which it should occur.
    • Rounding on input (READ) is now handled on systems where strtod honours the rounding mode. (For output, rounding is supported since GCC 4.5.) Note that for input, the compatible rounding mode is handled as nearest (i.e., for a tie, rounding to an even last significant [cf. IEC 60559:1989] – while compatible rounds away from zero for a tie).

    • Experimental support for scalar character components with deferred length (i.e. allocatable string length) in derived types has been added. (Deferred-length character variables are supported since GCC 4.6.)

  • Fortran 2008

    • When STOP or ERROR STOP is used to terminate the execution and any exception (but inexact) is signaling, a warning is printed to ERROR_UNIT, indicating which exceptions are signaling. The -ffpe-summary= can be used to fine-tune for which exception the warning should be shown.

gfortran 4.9.1

  • Full support for OpenMP 4.0: In GCC 4.9.1 (and later) there is now also full OpenMP 4.0 support for Fortran. (Except for actual offloading of target sections onto accelerators.) NOTE that modules using new OpenMPv4 features will generate a .mod file which is incompatible with GCC 4.9.0; otherwise, 4.9.0 and 4.9.1 generate identical (and hence compatible) .mod files.

gfortran 4.8

4.8 releases, 4.8 release notes, documentation

  • Compatibility notice

    • Module files: The version of the module files (.mod) has been incremented. Fortran MODULEs compiled by earlier GCC versions have to be recompiled, when they are USEd by files compiled with GCC 4.8, because GCC 4.8 is not able to read .mod file of earlier GCC versions; attempting to do so gives an error message. Note: The ABI of the produced assembler data itself has not changed: object files and libraries are fully compatible to older versions. (Except for the next item.)

    • ABI: Some internal names (name in the assembler/object file) have changed for symbols declared in the specification part of a module. If the module – or a file using such a symbol via use association – is recompiled, the module and all files which directly use such symbols have to be recompiled. The change only affects the following kind of module symbols:
      • Procedure pointers. Note: C-interoperable function pointers (type(c_funptr)) are not affected nor are procedure-pointer components.

      • Deferred-length character strings.
  • The BACKTRACE intrinsic subroutine has been added. It shows a backtrace at an arbitrary place in user code; program execution continues normally afterwards.

  • The -Wc-binding-type warning flag has been added (by default disabled), which warns if the a variable might not be C interoperable. In particular, if the variable has been declared using an intrinsic type with default kind instead of using a kind parameter defined for C interoperability in the intrinsic ISO_C_Binding module. Before, the warning was always printed. This flag is implied by -Wall.

  • The -Wrealloc-lhs and -Wrealloc-lhs-all warning flags have been added, which diagnose when code to is inserted for automatic (re)allocation of a variable during assignment. The flag can be used to decide whether it is safe to use -fno-realloc-lhs. Additionally, it can be used to find automatic (re)allocation in hot loops. (For arrays, replacing var = by var(:) = disables the automatic reallocation.)

  • The -Wcompare-reals flag has been added. When this flag is set, warnings are issued when comparing REAL or COMPLEX types for equality and inequality; consider, where appropriate, to replace a == b by abs(a-b) < eps with a suitable eps. This flag is implied by -Wextra.

  • The -Wtarget-lifetime flag has been added (enabled with -Wall), which warns if the pointer in a pointer assignment might outlive its target. This flag is implied by -Wall.

  • Reading floating point numbers which use q for the exponential (such as 4.0q0) is now supported as vendor extension for better compatibility with old data files. It is strongly recommended to use for I/O the equivalent but standard conforming e (such as 4.0e0). [For the Fortran source code, consider replacing the q in floating-point literals by a kind parameter (e.g. 4.0e0_qp with a suitable qp). Note that - in the Fortran source code - replacing q by a simple e is not equivalent.]

  • The GFORTRAN_TMPDIR environment variable, for specifying a non-default directory for files opened with STATUS="SCRATCH", is not used anymore. Instead gfortran checks the POSIX/GNU standard TMPDIR environment variable. If TMPDIR is not defined, gfortran falls back to other methods to determine the directory for temporary files as documented in the user manual.

  • Fortran 2003

    • Support for unlimited polymorphic variables (CLASS(*)) has been added. Note that nonconstant character lengths are not yet supported.

  • TS 29113

    • Assumed types (TYPE(*)) are now supported.

    • Experimental support for assumed-rank arrays (dimension(..)) has been added. Note that currently gfortran's own array descriptor is used, which is different from the one defined in TS29113, see gfortran's header file or use the Chasm Language Interoperability Tools.

gfortran 4.7

4.7 releases, 4.7 release notes, documentation

  • OpenMP 3.1 is now supported by the C, C++ and Fortran front end.

  • The compile flag -fstack-arrays has been added, which causes that all local arrays are put on stack memory. For some programs this will improve the performance significantly. If your program uses very large local arrays, it is possible that you will have to extend your runtime limits for stack memory.

  • The -Ofast flag now also implies -fno-protect-parens and -fstack-arrays.

  • The flag -Wreal-q-constant has been added, which warns if floating-point literals have been specified using q (such as 1.0q0); the q marker is now supported as vendor extension to denote quad precision (REAL(16) or if not available REAL(10)). Consider using a kind parameter (such as in 1.0_qp) instead, which can be obtained via SELECTED_REAL_KIND.

  • Front-end optimizations can now be selected by the -ffrontend-optimize option, or deselected by the -fno-frontend-optimize option. -ffrontend-optimize is the default when any -O option is in effect.

  • When front-end optimization removes a function call, the -Wfunction-elimination option warns about the removal.

  • When performing front-end optimization, the -faggressive-function-elimination option allows the removal of duplicate function calls even for impure functions.

  • The GFORTRAN_USE_STDERR environment variable has been removed. GNU Fortran now always prints error messages to standard error. If you wish to redirect standard error, please consult the manual for your OS, shell, batch environment etc. as appropriate.

  • The -fdump-core option and GFORTRAN_ERROR_DUMPCORE environment variable have been removed. When encountering a serious error, gfortran will now always abort the program. Whether a core dump is generated depends on the user environment settings; see for POSIX shells the ulimit -c and for C shells the limit coredumpsize setting, and see the WER user-mode dumps settings on Windows.

  • The -fbacktrace option is now enabled by default. When encountering a fatal error, gfortran will attempt to print a backtrace to standard error before aborting. It can be disabled with -fno-backtrace. Note: On POSIX targets with the addr2line utility from GNU binutils, GNU Fortran can print a backtrace with function name, file name, line number information in addition to the addresses; otherwise only the addresses are printed.

  • The compile options -freal-N-real-Mhave been added. These options promote all entities on type REAL(N) to REAL(M), where N and M can be 4 and 8 and, if available, 10 and 16.

  • The compile option -finteger-4-integer-8 has been added. This option promotes all entities of type INTEGER(4) to INTEGER(8).

  • Fortran 2003

    • Generic interface name which have the same name as derived types are now supported, which allows to write constructor functions. Note that Fortran does not support static constructor functions; only default initialization or an explicit structure-constructor initialization are available.
    • Polymorphic (class) arrays are now implemented. Whilst still not perfect, gfortran now performs at least as well as most of the other products.

  • Fortran 2008

    • Coarrays: Full single-image support except for polymorphic coarrays. Initial and very preliminary support for multi-images via an of MPI-based coarray communiciation library. Note: The library version is not yet usable as remote coarray access is not yet possible.

    • Support for the DO CONCURRENT construct has been added, which allows the user to specify that individual loop iterations have no interdependencies.

  • TS 29113

    • New flag -std=f2008ts permits programs that are expected to conform to the Fortran 2008 standard and the draft Technical Specification (TS) 29113 on Further Interoperability of Fortran with C.

    • The OPTIONAL attribute is now allowed for dummy arguments of BIND(C) procedures.

    • The RANK intrinsic has been added
    • The ASYNCHRONOUS implementation of GCC since version 4.6 is compatible with the TS 29113 changes.

gfortran 4.6

4.6 releases, 4.6 release notes, documentation

  • GCC now ships with the LGPL-licensed libquadmath library, which provides for targets with a __float128 datatype quad-precision mathematical functions. __float128 is available for targets on 32-bit x86, x86-64 and Itanium architectures. The libquadmath library is automatically build on such targets when building the Fortran compiler.

  • On systems supporting the libquadmath library, GNU Fortran now also supports a quad-precision, kind=16 floating-point data type (REAL(16), COMPLEX(16)). As the data type is not fully supported in hardware, calculations might be one to two orders of magnitute slower than with the 4, 8 or 10 bytes floating-point data types. This change does not affect systems which support REAL(16) in hardware nor those which do not support libquadmath.

  • Much improved compile time for large array constructors.
  • In order to reduce execution time and memory usage, use of temporary arrays in assignment expressions is avoided for many cases. The compiler now reverses loops in order to avoid generating a temporary array where possible.
  • Improved diagnostics, especially with -fwhole-file.

  • -fwhole-file flag is now enabled by default. The flag improves the code generation and diagnostics. It can be disabled using the deprecated -fno-whole-file flag.

  • Support the generation of Makefile dependencies via the `-M...` flags of GCC; you may need to specify additionally the -cpp option. The dependencies take modules, Fortran's include, and CPP's #include into account. Note: Using -M for the module path is no longer supported, use -J instead.

  • A new command-line option -Wunused-dummy-argument warns about unused dummy arguments and is included in -Wall. Before -Wunused-variable also warned about unused dummy arguments.

  • The flag -Wconversion has been modified to issue only warnings if the conversion leads to information loss, which drastically reduces the number of warnings; -Wconversion is thus now enabled with -Wall. The flag -Wconversion-extra has been added and warns also about other conversion; -Wconversion-extra typically shows a huge number warnings, most of which can be ignored.

  • Fortran 2003

    • Extended support for polymorphism and object-oriented programming.

    • Experimental, incomplete support of the ASSOCIATE construct.
    • In pointer assignments it is now possible to specify the lower bounds of the pointer and, for a rank-1 or a simply contiguous data-target, to remap the bounds.
    • Automatic (re)allocation: In intrinsic assignments to allocatable variables the left-hand side will be automatically allocated (if unallocated) or reallocated (if the shape or type parameter is different). To avoid the small performance penalty, you can use for arrays and character strings a(:) = ... instead of a = ... -- or disable the feature using -std=f95 or -fno-realloc-lhs.

    • Deferred type parameter: For scalar allocatable and pointer variables the character length can be deferred.
    • Namelist variables with allocatable and pointer attribute and nonconstant length type parameter.
  • Fortran 2008

    • Experimental coarray support (incomplete and for one image only, i.e. num_images() == 1)

    • The STOP and the new ERROR STOP statements now support all constant expressions.
    • Support for the CONTIGUOUS attribute.

    • Support ALLOCATE with MOLD.

    • Support for the STORAGE_SIZE intrinsic inquiry function.

    • Support of the NORM2 and PARITY intrinsic functions.

    • The following bit intrinsics were added: POPCNT and POPPAR for counting the number of one bits and returning the parity; BGE, BGT, BLE, and BLT for bitwise comparisons; DSHIFTL and DSHIFTR for combined left and right shifts, MASKL and MASKR for simple left and right justified masks, MERGE_BITS for a bitwise merge using a mask, SHIFTA, SHIFTL and SHIFTR for shift operations, and the transformational bit intrinsics IALL, IANY and IPARITY.

    • Support of the EXECUTE_COMMAND_LINE intrinsic subroutine.

    • Support for the IMPURE attribute for procedures, which allows for ELEMENTAL procedures without the restrictions of PURE.

    • Null pointers (including NULL()) and not allocated variables can be used as actual argument to optional non-pointer, non-allocatable dummy arguments, denoting an absent argument.

    • Non-pointer variables with TARGET attribute can be used as actual argument to POINTER dummies with INTENT(IN)

    • Pointers including procedure pointers and those in a derived type (pointer components) can now be initialized by a target instead of only by NULL.

    • The EXIT statement (with construct-name) can be now be used to leave not only the DO but also the ASSOCIATE, BLOCK, IF, SELECT CASE and SELECT TYPE constructs.

    • Internal procedures can now be used as actual argument.
    • The named constants INTEGER_KINDS, LOGICAL_KINDS, REAL_KINDS and CHARACTER_KINDS of the intrinsic module ISO_FORTRAN_ENV have been added; those arrays contain the supported kind values for the respective types.

    • The module procedures C_SIZEOF of ISO_C_BINDINGS and COMPILER_VERSION and COMPILER_OPTIONS of ISO_FORTRAN_ENV have been implemented.

    • Minor changes: obsolesce diagnostics for ENTRY was added for -std=f2008; a line may start with a semicolon; for internal and module procedures END can be used instead of END SUBROUTINE and END FUNCTION; SELECTED_REAL_KIND now also takes a RADIX argument; intrinsic types are supported for TYPE(intrinsic-type-spec); multiple type-bound procedures can be declared in a single PROCEDURE statement. Implied-shape arrays are supported for named constants (PARAMETER). The transformational, three argument versions of BESSEL_JN and BESSEL_YN were added -- the elemental, two-argument version had been added in GCC 4.4; note that the transformational functions use a recurrence algorithm.

gfortran 4.5

4.5 releases, 4.5 release notes

  • -finit-real= now supports also the option "snan" for signalling not-a-number; you need to enable trapping (e.g. via -ffpe-trap=) to make them really signalling. (Note: Compile-time optimizations can turn a signalling NaN into a quiet one.)
  • New option -fcheck=<all|bounds|array-temps> which supersedes -fbounds-check and -fcheck-array-temporaries (which are still supported).

  • New run-time checking: -fcheck=recursive for finding recursive calls to subroutines/functions which are not marked as recursive.
  • New run-time checking: -fcheck=do for finding invalid modification of DO loop iteration variables.
  • New experimental flag, -fwhole-file, which in some form will become the default. The flag allows whole-file checking of procedure arguments and also is supposed to allow a better optimization by the middle end of the compiler (no internal double declaration of procedures). The -fwhole-file is automatically used with -fwhole-program (now supported) and with -flto (new since this 4.5 release).

  • COMMON default padding has been changed - instead of adding the padding before a variable it is now added afterwards, which increases the compatibility with other vendors and helps to obtain the correct output in some cases. See also -falign-commons (which was added in 4.4) and PR 37614.

  • -fbounds-check does now warn about invalid string-lengths of character dummy arguments.
  • The I/O library was restructured for performance and cleaner code.
  • Array assignments and in WHERE is now run in parallel when OpenMP's WORKSHARE is used.
  • Complex math improvements: MPC is used for compile-time simplifications (initialization expressions) when found during configure

  • gfortran no longer links agains libgfortranbegin. As before MAIN__ is the actual Fortran main program, which is invoked main(). However, main() is now generated and in the same object file as MAIN__. For the time being, libgfortranbegin still exists for backward compatibility, even though it is no longer needed. (Advantage: Better optimization, less confusion about when to link libgfortranbegin and when not.)

  • GCC$ compiler directives have been added to set the extended attributes STDCALL, FASTCALL, CDECL, DLLIMPORT and DLLEXPORT.

  • New option -fcheck=pointer, which does some pointer association checks in calls. Note: Undefined pointers (= neither associated nor unassociated) are not handled, yet, nor other expressions with pointers.

  • For Fortran 77 compatibility: If -fno-sign-zero is used, the SIGN intrinsic behaves now as if zero were always positive.
  • The new flag -fno-protect-parens has been added; if set, the compiler may reorder REAL and COMPLEX expressions without regard to parentheses.
  • For legacy compatibiliy: On Cygwin and MinGW, the special files CONOUT$ and CONIN$ (and CONERR$ which maps to CONOUT$) are supported.

  • Fortran 2003

    • Procedure pointer function results.
    • The ERRMSG= argument is now supported in the ALLOCATE and DEALLOCATE statements.
    • Support of DEFERRED type-bound procedures.
    • ISO_C_BINDING module: INT_FAST*_T are now supported
    • Full support for procedure pointer components (including PASS).
    • Extensible derived types with type-bound procedure or procedure pointer with PASS attribute now have to use CLASS in line with the Fortran 2003 standard; the workaround to use TYPE is no longer supported.

    • The SOURCE= argument and a type-spec are supported in the ALLOCATE statement

    • OPERATOR(*) and ASSIGNMENT(=) is now allowed as GENERIC type-bound procedure (i.e. type-bound operators).
    • Allocatable scalars (experimental support)
    • I/O: Rounding (round=) on output is now supported.

    • Experimental support for polymorphic datatypes (CLASS) and SELECT TYPE; note that the support is incomplete and corner cases might not be handled correctly. (See OOP for details.)

  • Fortran 2008

    • ISO_FORTRAN_ENV module: INT8, INT16, INT32, INT64, REAL32, REAL64 and REAL128 are now supported
    • Improvements to math intrinsics: scaled_erfc in initialization expressions
    • The OPEN statement now supports the NEWUNIT= option, returns a unique file-unit and thus saving the user from ensureing him-/herself that no part of the program inadvertently uses the same unit.
    • Support complex arguments to TAN, SINH, COSH, TANH, ASIN, ACOS, and ATAN. Add support for ASINH, ACOSH, ATANH. Add ATAN(Y,X) as alias for ATAN2(Y,X).

    • Support for unlimited format items has been added.
    • Experimental support of the BLOCK construct, though a lot of details and corner cases are not implemented correctly and behaviour may change in future versions

gfortran 4.4

4.4 releases, 4.4 release notes

  • Wide characters: "ISO_10646" (UCS-4, kind=4) including I/O with encoding="UTF-8". (Unsupported are UTF-8 characters in the Fortran source files; use -fbackslash with \u... and \U... instead.)
  • Employ libcpp directly instead of using cc1 as an external preprocessor. The -cpp option was added to allow manual invocation of the preprocessor.
  • Version 3 of the OpenMP specification is now supported by the C, C++ and Fortran frontend (before version 2.5 was implemented).

  • If using an intrinsic not part of the selected standard (via -std= and -fall-intrinsics) gfortran will now treat it as if this procedure were declared EXTERNAL and try to link to a user-supplied procedure. -Wintrinsics-std will warn whenever this happens. The now-useless option -Wnonstd-intrinsic was removed.

  • The -Warray-temporaries option warns about array temporaries generated by the compiler, as an aid for optimization.

  • As another aid for optimization, when an array temporary had to be created for an function argument, a warning is printed at run time when the option -fcheck-array-temporaries is used. (The difference between -Warray-temporaries and -fcheck-array-temporaries is that the latter only prints a warning if the actual argument is noncontigious and thus the copying actually happens. The -Warray-temporaries already warns when code is inserted to cater for the noncontigious case.)

  • The generation of debugging information (DWARF) has been further enhanced. Note: gdb does not yet support all of these.
  • New flags have been added to control the alignment of variables in COMMON blocks: -falign-commons (which is the default) and its negation -fno-align-commons. The corresponding warnings can be disabled by -Wno-align-commons.
  • Fortran 2003

    • Asynchronous I/O is supported (still implemented as synchronous I/O), decimal=, size=, sign=, pad= blank=, delim= specifiers.
    • Support for structure constructors.
    • Support for array constructor with typespec.
    • Type extension and abstract types.
    • Procedure Pointers (but not yet as component in derived types and as function results)

    • Type-bound procedures, both PROCEDURE and GENERIC but not as operators. Note: PASS is not fully supported as CLASS(...) is not implemented; use it with TYPE(...) as non-standard-conforming workaround (to be removed when CLASS is implemented).
  • Fortran 2008

    • Support for a few intrinsics: ASINH, ACOSH, ATANH, ERF, ERFC, GAMMA, LOG_GAMMA, BESSEL_*, HYPOT and ERFC_SCALED (some of these were available as vendor extension before). Missing are the three-argument form of BESSEL_*N and the complex versions of A{SIN,COS,TAN}{,H}.
    • g0 format descriptor.
    • LEADZ and TRAILZ.
    • REVERTED: Temporarily, arrays with maximal rank of 15 (before 7) were supported, but the patch has been reverted because of PR36825

gfortran 4.3

4.3 releases, 4.3 release notes

  • Optionally, call a optimized BLAS library (-fexternal-blas) for matrix operations such as matmul rather than the built-in algorithm.

  • Programs can now optionally dump a core instead of only quitting when an error occurs (such as cannot allocate); this can be set using -fdump-core and overwritten by the run-time variable GFORTRAN_ERROR_DUMPCORE=YES|NO.

  • Support for backtraces on glibc-based systems via the -fbacktrace option is now implemented. On all systems, a coredump can be generated for errors in the run-time library using `-fdump-core`.

  • GFortran 4.3 now defines __GFORTRAN__ when it runs the C preprocessor (CPP).

  • Added support for subreference array pointers; eg. int_ptr_array => derived_array_target(:)%int_component

  • New options to initialize local variables: -finit-local-zero, -finit-real, -finit-integer, -finit-character, and -finit-logical

  • Changed: -fno-backslash is now the default to be more compatible with Fortran 2003; use -fbackslash if you need C character escape sequences.

  • Versioned symbols are used now on platforms supporting them. Programs compiled with gfortran 4.3 are guaranteed to work with the libgfortran library of future gfortran releases.
  • Fortran 2003

    • Added support for VOLATILE, VALUE and PROTECTED statement/attribute.
    • Added support for IMPORT and POINTER, INTENT(*).
    • The following intrinsic modules are now supported: omp_lib, omp_lib_kinds, ISO_FORTRAN_ENV.
    • The renaming of operators on the USE statement is now supported.
    • C interoperability support (ISO Bind C) has been added. The code was contributed by Christopher D. Rickett of Los Alamos National Lab.
    • Support for ABSTRACT INTERFACEs and the PROCEDURE statement (no procedure pointers yet) has been added by Janus Weil (Google Summer of Code project)
    • BOZ are now supported, i.e. using BOZ as argument of INT(), REAL(), DBLE() and CMPLX(). Additionally, BOZ used in DATA statements to initialize non-integer variables and BOZ directly assigned to a real/complex are now transferred bitwise. See the GNU Fortran manual for details.

  • Fortran 2008

    • The intrinsic functions GAMMA (true gamma function) and LGAMMA (logrithmic gamma function) have been added; use external gamma to continue using a user/external function.

gfortran 4.2

4.2 releases, 4.2 release notes

  • GFortran 4.2 and 4.3 use now 4-byte record markers by default for unformatted files to be compatible with g77 and most other compilers. The implementation allows for records bigger than 2 GB, compatible with several other compilers. Older versions of GFortran used by default 8-byte record markers (on most systems); in order to change length of record markers, e.g. to the read unformatted files created by older gfortran versions, the -frecord-marker=8 option can be used.
  • Paul Thomas has implemented elemental subroutine support.
  • Jakub Jelinek committed the front end support for OpenMP on 2006-02-14.
  • Paul Thomas has implemented the array valued TRANSFER intrinsic and an inline version of DOT_PRODUCT.
  • Roger Sayle has improved the processing of WHERE statements and blocks.
  • The DEC extensions %VAL, %LOC and %REF are now supported.
  • Fortran 2003

    • Jerry De Lisle added support for the streaming IO extension.
    • Erik Edelmann has implemented allocatable dummy arguments and function results.
    • Erik Edelmann and Paul Thomas have implemented allocatable components (also known as TR 15581).

gfortran 4.1

4.1 releases, 4.1 release notes

  • Cray pointer support is now implemented.
  • gfortran can now build F90gl out of the box.
  • Helmut Michels has made a free version of his extensive scientific graphics/GUI package DISLIN available for gfortran.

  • Jakub Jelinek updated libgfortran on 2005-11-21 to a thread safe library in preparation for OpenMP.
  • Fortran 2003: The ENUMERATION feature is now supported.

None: GFortran/News (last edited 2018-10-21 19:09:13 by ThomasKoenig)