= gfortran — the GNU Fortran compiler, part of GCC = Gfortran is the name of the GNU Fortran project, developing a free [[GFortranStandards|Fortran 95/2003/2008]] compiler for GCC, the GNU Compiler Collection. The gfortran development effort uses an open development environment in order to attract a larger team of developers and to ensure that gfortran can work on multiple architectures and diverse environments. This wiki contains links to binary packages for gfortran, up-to-date status of the compiler, recently fixed bugs, etc. You can find here our [[GFortranGettingStarted|"getting started"]] web page for new users of gfortran. The [[http://gcc.gnu.org/fortran/|official homepage]] for gfortran also contains a limited amount of general information about the project, its goals and the ways you can contribute. === Quick links === * [[#news|What's new in gfortran]]: [[#GCC4.1|4.1]], [[#GCC4.2|4.2]], [[#GCC4.3|4.3]], [[#GCC4.4|4.4]], [[#GCC4.5|4.5]], [[#GCC4.6|4.6]], [[#GCC4.7|4.7]], [[#GCC4.8|4.8]], [[#GCC4.9|4.9]] * <>Download * [[GFortranBinaries|Binaries]] for Windows, Linux, MacOS and much more! * Vendor-provided [[GFortranDistros|packages for common OS distributions]] * [[GFortranSource|Source code]] * [[GFortranPlatforms|Platforms]] where gfortran is known to work * [[#manuals|Manuals]] and other documentation * [[#bugs|Reporting bugs]] * [[http://en.wikipedia.org/wiki/Fortran_language_features|Michael Metcalf's article on Fortran language features in Wikipedia]] * [[http://sites.google.com/site/gfortransite/|OpenMP in gfortran information web page]] * [[http://www.gfortran.org/|gfortran.org]] * [[https://github.com/jerryd/gtk-fortran|Fortran GUI Interface]] (Fortran interface for Gtk) * GNU Fortran-related mailing lists and news groups * [[http://gcc.gnu.org/lists.html|GNU Fortran list (general purpose and developing)]] ([[http://gcc.gnu.org/ml/fortran/|Archive]]) * [[http://groups.google.com/group/gnu-fortran|GNU Fortran user list]] (less active than the one above) * `comp.lang.fortran` [[http://en.wikipedia.org/wiki/Usenet_newsgroup|news group]] (Fortran in general) - [[http://groups.google.com/group/comp.lang.fortran|comp.lang.fortran]] [[http://www.rhinocerus.net/forum/lang-fortran/|rhinocerus.net]] * [[https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=comp-fortran-90|Fortran 90 mailing list]] (Fortran in general, less active than comp.lang.fortran) * [[irc://irc.oftc.net/gfortran|#gfortran on irc.oftc.net]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2007-01-01&chfieldto=2007-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2007&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2007]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2008-01-01&chfieldto=2008-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2008&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2008]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2009-01-01&chfieldto=2009-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2009&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2009]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2010-01-01&chfieldto=2010-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2009&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2010]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2011-01-01&chfieldto=2011-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2011&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2011]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2012-01-01&chfieldto=2012-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2012&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2012]] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=RESOLVED&resolution=FIXED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=2013-01-01&chfieldto=2013-12-31&chfield=resolution&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&query_based_on=2013&field0-0-0=noop&type0-0-0=noop&value0-0-0=|Bugs fixed in 2013]] * [[Fortran 95 tutorials available online]] * [[http://ftagshtml.sourceforge.net|ftagshtml]] A call graph generator for Fortran and C * [[http://people.irisa.fr/Edouard.Canot/f90cache|f90cache]] A Fortran 90 compiler cache (works like ccache) === Using gfortran: === * [[GfortranApps|List of Applications that gfortran compiles]] * [[GfortranBuild|Building common software packages with gfortran]] * [[GFortranResults|Test results]] === For gfortran developers === * Bug Bashing (status 23rd August 2011; incl. some double counting) * [[http://gcc.gnu.org/bugzilla/buglist.cgi?short_desc_type=allwordssubstr&short_desc=regress&component=fortran&component=libfortran&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|Regressions]] 4 bugs 0 assigned * [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=blocked&type0-0-0=equals&value0-0-0=32834|PRs where a valid program is rejected or wrong code is produced]] 7 bugs, 3 assigned ('''Fortran 95''' with default options) * [[http://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&field0-0-0=blocked&type0-0-0=anywordssubstr&value0-0-0=42361+32834&field0-1-0=bug_id&type0-1-0=notequals&value0-1-0=32834|Serious bugs]] 11 bugs; includes '''Fortran 95''' bugs from above plus selected other bugs with high priority * [[http://gcc.gnu.org/bugzilla/buglist.cgi?component=fortran&component=libfortran&keywords_type=anywords&keywords=wrong-code&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|PRs where wrong code is produced]] 44 bugs [often triggered for special cases only] * [[http://gcc.gnu.org/bugzilla/buglist.cgi?component=fortran&component=libfortran&keywords_type=anywords&keywords=ice-on-valid-code,rejects-valid,wrong-code,compile-time-hog,memory-hog,link-failure&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|PRs where a valid Fortran program is not accepted (internal compiler error, wrongly rejected), wrong code is produced or where the compile time or memory is excessively high]] 131 bugs * [[http://gcc.gnu.org/bugzilla/buglist.cgi?component=fortran&component=libfortran&keywords_type=anywords&keywords=accepts-invalid,ice-on-invalid-code&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|PRs where invalid code is accepted or gives an internal compiler error]] 83 bugs * [[http://gcc.gnu.org/bugzilla/buglist.cgi?component=fortran&component=libfortran&keywords_type=anywords&keywords=diagnostic&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|PRs which show where the diagnostics can be improved]] 105 bugs * [[http://gcc.gnu.org/bugzilla/buglist.cgi?component=fortran&component=libfortran&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED|All reports (bug reports, feature requests etc.)]]: 550 reports * [[http://gcc.gnu.org/bugzilla/chart.cgi?category=-All-&label0=Fortran&label1=Fortran%20-%20accepts-invalid&label2=Fortran%20-%20diagnostic&label3=Fortran%20-%20wrong-code&line0=120&line1=122&line2=123&line3=124&name=32&subcategory=-All-&action=wrap&width=700&height=450|Graphical bug count timeline]] (Bugzilla account unfortunately required) * [[GFortran46|Projects for inclusion into gfortran-4.6]]: please add your own projects there, with an approximate date of merging and state of readiness * [[GFortran45_actions|Action list for gfortran-4.5]]: summary of gfortran get-together of 2008-11-28 * [[Fortran2003Status|Fortran 2003 implementation status of the GNU Fortran Compiler]] ([[Fortran2003|time line]]) * [[Fortran2008Status|Fortran 2008 implementation status of the GNU Fortran Compiler]] * [[TS29113Status|Implementation status of '''TS 29113''' on further interoperability of Fortran with C]] * [[TestCaseWriting|Beginner's guide to writing testcases]] - see also on the main Wiki [[http://gcc.gnu.org/wiki/HowToPrepareATestcase|HowToPrepareATestcase]] * [[http://quatramaran.ens.fr/~coudert/gfortran/documentation/index.html|Doxygen documentation of the compiler]] * [[http://quatramaran.ens.fr/~coudert/gfortran/libgfortran_doxygen/html/|Doxygen documentation of libgfortran]] * SymbolVersioning for runtime libraries. * LibgfortranAbiCleanup * ArrayDescriptorUpdate * [[GFortranPatchTracker|Tracking unreviewed patches]] * [[GFortranScalarizer]] documents the scalarizer gfortran uses internally to translate array fortran statements into scalar code enclosed in a loop. <
> ---- . <> === Manuals and other documentation === GFortran documentation is included with the GCC documentation, which is available from the GCC website. There is documentation for released compilers, and also documentation for the latest snapshot from the development tree. The manuals are re-generated nightly. * Documentation for the [[http://gcc.gnu.org/onlinedocs/gfortran/|current development snapshot]] ([[http://gcc.gnu.org/onlinedocs/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gfortran/|4.7.0 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gfortran/|4.6.3 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gfortran/|4.5.3 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.4.7/gfortran/|4.4.7 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.4.7/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.3.6/gfortran/|4.3.6 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.3.6/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gfortran/|4.2.4 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc.pdf|PDF]]) * Documentation for the [[http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gfortran/|4.1.2 release]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gfortran.pdf|PDF]]); [[http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/|optimization flags]] ([[http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc.pdf|PDF]]) * Documentation of the [[http://gcc.gnu.org/onlinedocs/gfc-internals/|GNU Fortran Internals]] ([[http://gcc.gnu.org/onlinedocs/gfc-internals.pdf|PDF]]). * [[http://quatramaran.ens.fr/~coudert/gfortran/documentation/index.html|Doxygen documentation of the compiler]], points to the full Doxygen documentation, including sources, globals and symbols. This allows you to follow the frontend code in some considerable detail. * [[GFortranUsage]] contains helpful info about using gfortran * [[GfortranFAQ|Frequently encountered problems]] * [[GFortranG77|g77]] was the predecessor to gfortran. As of gcc-4.0, it is no longer actively supported * Draft versions of the Fortran standards can be downloaded from the standards committee websites; see [[GFortranStandards]] for details. * Floating point accuracy: [[FloatingPointMath|Semantics of Floating Point Math in GCC]], [[x87note|x87 note]], [[Math_Optimization_Flags]], [[http://www.validlab.com/goldberg/paper.pdf|Goldberg paper]] [[http://www.google.de/search?q=Goldberg+What+Every+Computer+Scientist+Should+Know+About+Floating-Point+Arithmetic|2]], [[http://hal.archives-ouvertes.fr/hal-00128124|Monniaux paper]] ---- . <> === Reporting bugs === You can report bugs in [[http://gcc.gnu.org/bugzilla/|GCC bugzilla]]. You can look for existing bugs, track bug fixing progress, and report new bugs there. The list of all open gfortran bugs (including enhancement requests and low-priority bugs) can be found [[http://gcc.gnu.org/bugzilla/buglist.cgi?query_format=&short_desc_type=allwordssubstr&short_desc=&component=fortran&component=libfortran&known_to_fail_type=allwordssubstr&known_to_work_type=allwordssubstr&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=|here]]. Before submitting a bug report, please update your version of gfortran to the latest available release of GCC. For example, if you find a bug with gfortran 4.0.2, then upgrade to at least GCC 4.1.0 and see if the bug is still present. There is a separate page for the [[GfortranWanted|most wanted gfortran bugs]], which contains a list of bugs that block gfortran from building major packages. Some ideas for [[GfortranImprovements|enhancing gfortran]] can also be of interest... Use the gfortran mailing list, fortran@gcc.gnu.org , to ask the gfortran community your questions, and report bugs if you are uncertain on how to handle bugzilla. We'll be glad to help! <
> ---- . <> === What's new in gfortran? === [[#GCC4.1|4.1]], [[#GCC4.2|4.2]], [[#GCC4.3|4.3]], [[#GCC4.4|4.4]], [[#GCC4.5|4.5]], [[#GCC4.6|4.6]], [[#GCC4.7|4.7]], [[#GCC4.8|4.8]], [[#GCC4.9|4.9]] . <> == gfortran 4.1 == [[http://gcc.gnu.org/gcc-4.1/|4.1 releases]], [[http://gcc.gnu.org/gcc-4.1/changes.html|4.1 release notes]] * Cray pointer support is now implemented. * gfortran can now build F90gl out of the box. * The Fortran 2003 ENUMERATION feature is now supported. * Helmut Michels has made a free version of his extensive scientific graphics/GUI package [[http://www.mps.mpg.de/dislin|DISLIN]] available for gfortran. * Jakub Jelinek updated libgfortran on 2005-11-21 to a thread safe library in preparation for OpenMP. . <> == gfortran 4.2 == [[http://gcc.gnu.org/gcc-4.2/|4.2 releases]], [[http://gcc.gnu.org/gcc-4.2/changes.html|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. * Erik Edelmann has implemented allocatable dummy arguments and function results. Allocatable derived type components are on their way. * 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. * Jerry De Lisle added support for the Fortran 2003 streaming IO extension. * Erik Edelmann and Paul Thomas have implemented Fortran 2003's allocatable components (also known as TR 15581). * The DEC extensions %VAL, %LOC and %REF are now supported. . <> == gfortran 4.3 == [[http://gcc.gnu.org/gcc-4.3/|4.3 releases]], [[http://gcc.gnu.org/gcc-4.3/changes.html|4.3 release notes]] * Optionally, call a optimized BLAS library (`-fexternal-blas`) for matrix operations such as `matmul` rather than the built-in algorithm. * 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. * 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`. * The renaming of operators on the USE statement is now supported. * 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). * 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) * 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}}} * 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. * Changed: {{{-fno-backslash}}} is now the default to be more compatible with Fortran 2003; use {{{-fbackslash}}} if you need C character escape sequences. * [[http://gcc.gnu.org/onlinedocs/gfortran/BOZ-literal-constants.html|BOZ]]: Fortran 2003 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 [[http://gcc.gnu.org/onlinedocs/gfortran/BOZ-literal-constants.html|GNU Fortran manual]] for details. * 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. . <> == gfortran 4.4 == [[http://gcc.gnu.org/gcc-4.4/|4.4 releases]], [[http://gcc.gnu.org/gcc-4.4/changes.html|4.4 release notes]] * Support for a few Fortran 2008 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}. * Fortran 2003 I/O extensions: Asynchronous I/O is supported (still implemented as synchronous I/O), decimal=, size=, sign=, pad= blank=, delim= specifiers. * 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.) * Support for Fortran 2003 structure constructors. * Support for Fortran 2003 array constructor with typespec. * REVERTED: Temporarily, arrays with maximal rank of 15 (before 7) as required by Fortran 2008 were supported, but the patch has been reverted because of [[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36825|PR36825]] * Employ libcpp directly instead of using cc1 as an external preprocessor. The -cpp option was added to allow manual invocation of the preprocessor. * Fortran 2008 g0 format descriptor. * [[ProcedurePointers|Procedure Pointers]] (but not yet as component in derived types and as function results) * Version 3 of the [[http://openmp.org/wp/openmp-specifications/|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 [[http://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html#Error-and-Warning-Options|-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 [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html|-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. * Fortran 2003 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). * 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 2008's LEADZ and TRAILZ. . <> == gfortran 4.5 == [[http://gcc.gnu.org/gcc-4.5/|4.5 releases]], [[http://gcc.gnu.org/gcc-4.5/changes.html|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= 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 [[http://gcc.gnu.org/PR37614|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: [[http://www.multiprecision.org/|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$}}} [[http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html|compiler directives]] have been added to set the extended attributes STDCALL, FASTCALL, CDECL, DLLIMPORT and DLLEXPORT. * New option [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html|-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.6 == [[http://gcc.gnu.org/gcc-4.6/|4.6 releases]], [[http://gcc.gnu.org/gcc-4.6/changes.html|4.6 release notes]], [[http://gcc.gnu.org/onlinedocs/4.6.3/|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 [[http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html|`-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. * '''[[Fortran2003Status|Fortran 2003]]''' * Extended support for [[OOP|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 [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html|-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. * '''[[Fortran2008Status|Fortran 2008]]''' * Experimental [[Coarray|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.7 == [[http://gcc.gnu.org/gcc-4.7/|4.7 releases]], [[http://gcc.gnu.org/gcc-4.7/changes.html|4.7 release notes]], [[http://gcc.gnu.org/onlinedocs/4.7.2/|documentation]] * [[http://www.openmp.org/mp-documents/OpenMP3.1.pdf|OpenMP 3.1]] is now supported by the C, C++ and Fortran front end. * The compile flag [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfstack_002darrays_007d-254|-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 [[http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Ofast-689|-Ofast]] flag now also implies [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html|-fno-protect-parens]] and [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfstack_002darrays_007d-254|-fstack-arrays]]. * The flag [[http://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html|-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 [[http://gcc.gnu.org/onlinedocs/gfortran/SELECTED_005fREAL_005fKIND.html|SELECTED_REAL_KIND]]. * Front-end optimizations can now be selected by the [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfrontend_002doptimize_007d-275|-ffrontend-optimize]] option, or deselected by the [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfrontend_002doptimize_007d-275|-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 [[http://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html#index-g_t_0040code_007bWfunction_002delimination_007d-170|-Wfunction-elimination]] option warns about the removal. * When performing front-end optimization, the [[http://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html#index-g_t_0040code_007bfaggressive_002dfunction_002delimination_007d-270|-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 [[http://msdn.microsoft.com/en-us/library/bb787181(v=vs.85).aspx|WER]] user-mode dumps settings on Windows. * The [[http://gcc.gnu.org/onlinedocs/gfortran/Debugging-Options.html#index-g_t_0040code_007bfno-backtrace_007d-183|-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 [[http://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html#Fortran-Dialect-Options|-freal-N-real-M]]have 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 [[http://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html#Fortran-Dialect-Options|-finteger-4-integer-8]] has been added. This option promotes all entities of type `INTEGER(4)` to `INTEGER(8)`. * '''[[Fortran2003Status|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. * [[OOP|Polymorphic]] (`class`) arrays are now implemented. Whilst still not perfect, gfortran now performs at least as well as most of the other products. * '''[[Fortran2008Status|Fortran 2008]]''' * [[Coarray|Coarrays]]: Full single-image support except for polymorphic coarrays. Initial and very preliminary support for multi-images via an of MPI-based [[CoarrayLib|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. * '''[[TS29113Status|TS 29113]]''' * New flag [[http://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html#index-g_t_0040code_007bstd_003d_007d_0040var_007bstd_007d-option-53|-std=f2008ts]] permits programs that are expected to conform to the Fortran 2008 standard and the draft [[ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1942.pdf|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. ''The following items need still to be merged with the [[http://gcc.gnu.org/gcc-4.7/changes.html|GCC 4.7 changelog]]'' and/or with the [[http://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-and-2008-status.html|GNU Fortran manual]] . <> == gfortran 4.8 == [[http://gcc.gnu.org/gcc-4.8/|4.8 releases]], [[http://gcc.gnu.org/gcc-4.8/changes.html|4.8 release notes]], [[http://gcc.gnu.org/onlinedocs/4.8.0/|documentation]] * '''Compatibility notice''' * Module files: The version of the module files (`.mod`) has been incremented. Fortran `MODULE`s compiled by earlier GCC versions have to be recompiled, when they are `USE`d 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 [[http://gcc.gnu.org/onlinedocs/gfortran/BACKTRACE.html|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 [[http://gcc.gnu.org/onlinedocs/gfortran/TMPDIR.html|documented in the user manual]]. * '''[[Fortran2008Status|Fortran 2003]]''' * Support for unlimited polymorphic variables (`CLASS(*)`) has been added. Note that nonconstant character lengths are not yet supported. * '''[[TS29113Status|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 [[http://gcc.gnu.org/viewcvs/trunk/libgfortran/libgfortran.h?content-type=text%2Fplain&view=co|gfortran's header file]] or use the [[http://chasm-interop.sourceforge.net/|Chasm Language Interoperability Tools]]. . <> == gfortran 4.9 (the current development version) == [[http://gcc.gnu.org/gcc-4.9/|4.9 releases]], [[http://gcc.gnu.org/gcc-4.9/changes.html|4.9 release notes]], [[http://gcc.gnu.org/onlinedocs/#current|documentation]] /!\ Please remember not only to update this list, but also [[Fortran2003]], Fortran2003Status, Fortran2008Status, the [[http://gcc.gnu.org/gcc-4.9/changes.html|4.9 Changelog]] and the [[http://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-and-2008-status.html|GNU Fortran manual]] * '''Compatibility notice''' * Note that the argument passing (ABI) has changed for scalar dummy arguments of type `INTEGER`, `REAL`, `COMPLEX` and `LOGICAL`, which have ''both'' the `VALUE` and the `OPTIONAL` attribute. * 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. <
> ---- === gfortran compliance test coverage matrix (initial version) === * [[GFortranTestMatrix|Test Matrix]] ---- CategoryCategory