G95 is a stable, production Fortran 95 compiler available for multiple cpu architectures and operating systems. Innovations and optimizations continue to be worked on. Parts of the F2003 standard have been implemented in g95.


Download binaries, source and manual.

Links

Contributing Documentation
Mail Andy: andyv@firstinter.net (bugs, comments, complaints) Compiling g95 from source
G95 newsgroup on Google Screenshots
Fortran Open Directory links to compilers, tutorials, books, and code. Cool g95 things
Fortran.com products, services, and general information related to fortran. G95 Status
ISO_VARYING_STRING Module known to work with g95.
Debian packages for G95

Recent Milestones

May 18, 2008 SYNC ALL
May 17, 2007 Czech translation of manual
April 18, 2007 German translation of manual
March 14, 2007 Japanese translation of manual
March 13, 2007 French translation of manual
February 1, 2007 Russian translation of manual
November 29, 2006 Spanish translation of manual

Plan

The back end and libraries are now up for general testing on a variety of boxes and operating systems. The tarball is usually updated as the web page is. To download and install g95 on unix systems, run the following command (originally from Joost Vandevondele):
wget -O - http://ftp.g95.org/g95-x86-linux.tgz | tar xvfz -
This will create a directory named 'g95-install' in the current directory. Run (or better yet make an appropriate symbolic link) to ./g95-install/bin/i686-pc-linux-gnu-g95 in order to run g95.


August 26

Doug Cox has built some new windows builds.

Michael Richmond sent in a crash on kind=16 division that has been fixed.

Al Greynolds pointed out that -freal=nan caused a crash on kind=16 reals, which has been fixed.

I managed to get in some more work on making the library thread safe.


August 25

Michael Richmond sent in a crash for kind=16 reals that has mysteriously vanished.

Doug Cox has built some new windows builds.

Dominique d'Humières sent in a crash on long character strings, the TRANSFER intrinsic, and a procedure pointer issue that have all been fixed.

Walt Brainerd sent in a problem with DATA statements that has been fixed, as well as a problem with the VERIFY intrinsic that has been fixed. Walt also sent in a mystery crash that went away.

Walter Spector asked if there is a global lock around any of the library calls. The answer no, but I've started working on one. There are a lot of processors to support, but I've got most of the more popular ones working. Michael Richmond and I sent several mails back and forth working on the locks for the alpha.

Johnathon Hogg, Reinhold Bader and John Reid (all hail the convenor), sent in a subtle problem with array descriptors that has been fixed.


August 23

John Dormand found a rounding problem during multiplication of kind=16 reals that has been fixed.

Doug Cox has built some new windows builds.

I've added initial support for kind=16 real division.


August 22

John Dormand found a borrowing problem with kind=16 subtraction that has been fixed.

Michael Richmond pointed out that comparisons between kind=16 types weren't implemented. Got these now, though they're not well tested.


August 21

Doug Cox has built some new windows builds.

Michael Richmond sent in a bug in kind=16 real arrays that has been fixed.

Bill Long pointed out an error message that wasn't strictly correct. I've made the wording more precise.


August 20

Doug Cox has built some new windows builds.

I've added support for converting from kind=16 reals to all of the other reals and integers.


August 19

Jan-Willem Blokland and Angelo Graziosi pointed out that kind=16 reals weren't actually configured by default. Got that fixed now. Jan-Willem also pointed out that the -r16 option didn't exist yet. Added.

Jan-Willem sent in a problem with subtraction for kind=16 numbers that has been fixed. I've also added support for converting to kind=16 reals from all the other integer and real types.

Michael Richmond pointed out one final bug with the alpha build that has been fixed.


August 18

Michael Richmond sent in some pieces that will enable regular builds for alpha/linux once again.

I've added some initial support for kind=16 (quad precision) real arithmetic. Currently supported operations are addition, subtraction, multiplication, and printing. I have a nice paper on multi-word division that I am digesting.


August 14

Doug Cox has built some new windows builds.


August 13

Doug Cox has built some new windows builds.

Dominique d'Humières sent in a crash that was a regression from yesterday that has been fixed.

Matthew Halfant actually sent in a replacement link instead of just reporting a dead one. Added the new link.


August 12

Doug Cox has built some windows builds.

Michael Richmond and Alan Greynolds pointed out the regression in complex statement functions broken by the fix to Reinhold's interop problem yesterday. Also fixes for derived type statement functions.

Dave Korzekwa sent in a crash on SHAPE() that has been fixed.

Matthew Halfant pointed out a dead link in the manual that has been removed.


August 11

Doug Cox has built some new windows builds.

Charles Gerlach found a regression in the ALLOCATE statement on x86-64 that has been fixed.

Reinhold Bader sent in a C interop problem with structures that has been fixed.

Michael Richmond pointed out that the -mieee option is necessary for proper (ie ieee) floating point exception handling on the alpha, so I've added this option into the alpha specs.


August 9

Lionel Guez and Francisco Fadrique pointed out different problems with G editing that have been fixed. This is basically the third time I've written this code, though I reused a bunch of code from the first implementation.

Doug Cox has built some new windows builds.


August 8

Philippe Marguinaud sent in a crash on ENTRY statements with BIND clauses that has been fixed.

Glenn Wikle sent in a subtle crash involving array pointers that has been fixed.

Michael Richmond sent in a patch for handling floating point exceptions on alpha processors that has been applied.


August 7

Doug Cox has built some new windows builds.

I'm continuing work on the fix to the G formatting.


August 6

Scot Breitenfeld sent in a problem with TRANSFER() and C_PTR that has been fixed.

Dave Korzekwa reported a regression SHAPE() that has been fixed.


August 5

Doug Cox has built some new windows builds.

Frank Muldoon sent in a problem with kind=10 reals in namelists that has been fixed.

Spent the weekend working on an allocation problem that isn't solved yet.

I've been working on another bug involving incorrect formatting in G mode that is a little more than a one-day bug. I spent a long time staring at the standard expecting order where it turned out there was none, and am ending up with a fast but somewhat brute force solution.

The solution involves generating a table of high-precision floating point numbers. I'm choosing to do this in python. It turns out that you can implement arbitrary precision floating point addition, subtraction, multiplication, division, and even printing in a mere two hundred lines. Easy when you don't have to be particularly fast.


August 4

John Armstrong pointed out a typo in the manual that has been fixed.


July 31

Doug Cox has build some new windows builds.

Francois Jacq sent in a spurious -Wall warning about targets of C_PTR variables that has been toned down.


July 30

Doug Cox has built some new windows builds.

Charles Gerlach reported that my latest fix to the include mechanism failed to work. Turned out that he was mixing fortran includes and C preprocessing. Hopefully fixed now.

Johnathan Hogg sent in another crash, this time on allocatable array components that has been fixed.


July 29

Doug Cox has built some new windows builds.

Angelo Graziozi, Charles Gerlach and Florent Lyard pointed out that include's still aren't fixed. After enumerating the twelve main cases, I think I may have it fixed now.

Jonathan Hogg sent in a problem printing array sections that has been fixed.


July 28

Alan Greynolds reported that my previous fix wasn't working, I've fixed it for real now.

Charles Gerlach also reported that my previous fixed didn't work. Turned out that the problem there was that he was talking about fortran includes, and I fixed the C-preprocessor includes. Got that fixed now.

What I've actually done is to change things so that include directories specified with a -I (not absolute paths) are themselves searched relative to the path the of the program being compiled. This facilitates compiling a program from another directory, and it how other implementations work, a behaviour inherited from C compilers.


July 27

Doug Cox has build some new windows builds.


July 24

Doug Cox has built some new windows builds.

Alan Greynolds found another regression in ALLOCATE that has been fixed.

Mark Hadfield found a different regression (failure to deal correctly with whitespace) in ALLOCATE that has also been fixed.


July 23

Alan Greynold sent in a regression in FORALL that has been fixed.


July 22

Doug Cox has built some new windows builds.

Michael Richmond sent in a pair of regressions on ALLOCATE statements that has been fixed. I changed an old and awkward internal convention on how these were represented.


July 21

Alan Greynolds reported a regression in the build of osx/386, the "-arch i686" which is not supported by older versions of osx that has been fixed (by changing 686 to 386).

Charles Gerlach sent in a subtle problem with include paths and the C preprocessor that has been fixed.

Kristján Jónasson sent in a crash on some unlikely but invalid code that has been fixed.

Andrew Porter sent in a mystery crash that mysteriously has vanished.

Michael Grabietz send in a crash on arguments to intrinsic with extra parenthesis that has been fixed.


July 16

David Acreman sent in a crash on optimization on x86/darwin. Turned out to be some incompatibility with gcc-4.1, so I've downgraded back to 4.0, implementing the fix for the indirect branch bug.

Doug Cox has built some new windows builds.


July 15

Reinhold Bader sent in a problem with BIND(C) common blocks that has been fixed.

Doug Cox has built some new windows builds.


July 14

Reinhold Bader sent in a regression regarding TYPE(C_PTR) and TYPE(C_FUNPTR) that has been fixed.

Michael Richmond sent in a new build for alpha/linux. We are collaborating at getting a regular build going again.

Vivek Rao suggested a warning for ALLOCATE and DEALLOCATE statements that has been implemented.


July 10

I've fixed the "indirect jmp without `*'" bug on ppc/osx, incidentally upgrading g95 to use gcc-4.1 for that platform.


July 8

Matthew Halfant sent in a conformance problem that mysteriously vanished.

Dave Grote sent in a problem with absolute include directories being specified during C preprocessing that has been fixed. Charles Gerlach may have reported the same issue.


July 8

Doug Cox has build some new windows builds.

Vivek Rao pointed out a typo that has been fixed.


July 7

Hendrik Holst pointed out that BIND(C) variable were being left symbols to be actually declared in other object files. I've changed this to be a 'common' symbol that will define a variable if necessary, yet use another if it exists.


July 2

Doug Cox has built some new windows builds.

Martien Hulsen sent in problem with curses that is hopefully fixed.


July 1

Harald Anlauf sent in a crash on TRANSFER() that has been fixed.

Jonathan Hogg found a problem with -fbounds-check on x86-64 that has been fixed.

Doug Cox has built some new windows builds.


June 30

Scot Breitenfeld pointed out some problems with C_PTR that have been fixed.

Over the last week and a half, I've been working steadily on enhancing the build system. No real changes should be visible from the outside, but this will make things much more reliable long-time.


June 20

Martien Hulsen pointed out a problem with THIS_IMAGE()-- it doesn't live in ISO_FORTRAN_ENV, it's a regular intrinsic. Fixed this and the same problem with NUM_IMAGES().


June 19

Doug Cox has built some new windows builds.


June 18

Al Greynolds requested a nonstandard CONVERT= specifier in OPEN statements to specify endian conversion. Legal values are 'big_endian', 'little_endian', 'native' and 'swap'.

Scot Breitenfeld sent in a problem with C_LOC that has been fixed, I think.

Doug Cox has built some new windows builds.


June 17

John Harper sent in a crash on the MERGE intrinsic that has been fixed.

Patti Michell sent in an alternate procedure for configuring mpich so that it correctly finds g95. Added to the HOWTO.


June 12

Doug Cox has built some new windows builds.

John Harper pointed out that IEEE_SUPPORT_* intrinsic functions weren't supported. Added support.

Mat Cross pointed out a problem with log10(), when calculated within g95. It was a bit off, one bit to be precise. I've got this fixed now.


June 11

Manuel Guidon sent in a crash on x86_64 that has been fixed.

Doug Cox has build some windows builds.


June 10

Matt Hauer sent in a crash on DEALLOCATE statements that has been fixed.


June 3

We're back after a disk crash. The backup that my ISP restored was apparently a little more than a month old, so I am restoring things from my own copies as well as doing some new builds.


May 28

Doug Cox has built some new windows builds.


May 27

Reinhold Bader pointed out a problem with type declarations that has been fixed, as well as a problem with intrinsic module procedures and parameters in modules

Reinhold Bader and Kristján Jónasson sent in a problem with intrinsic module procedures that has been fixed.

Roberto Dallocchio sent in a problem with logical SELECT statements that has been fixed.

Doug Cox has built some new windows builds.

James Van Buskirk contributed a number of tests of instrinsic functions that I am incorporating into the existing suite.


May 21

Things are kind of stuck with g95 at the moment, most of my build network is unavailable due to just the right router frying itself. Repairs are under way and will hopefully be finished Saturday.


May 14

Jonathan Hogg sent in another regression on x86-64 that has been fixed. Despite all the regressions, this upgrade has been relatively painless.

David Shanen reported that I didn't actually fix his problem. After some more digging, I've found and fixed the problem.

Doug Cox has built some new windows builds.

Doug has also added a Debian/Ubuntu install package. It's up on the downloads page.


May 12

Jonathan Hogg and David Shanen sent in a regression involving x86-64 array integers that has been fixed.

Doug Cox has built some new windows builds.


May 9

Jonathan Hogg and Michael Richmond reported a regression with the array-size expansion on x86-64 that has been fixed.


May 8

Finished the array kind index expansion.


May 7

Reinhold Bader pointed out a scalar/vector problem that has been fixed.


May 6

Work continues on the array index kind expansion. John's test program now works, but some other regressions have been created that I've been working on those. No new build yet.

Jean-Baptiste Faure sent in a spurious warning that has been fixed.

Bob Bauer's chocolate made some terrific fudge. I know that I wax poetic sometimes about chocolates, but I really do love it. For those curious about how big of a lardass I am, I've lost forty pounds in the last six months and have just recently left the realm of 'overweight' by BMI standards.


May 4

John Reid and others have pointed out that array indeces on 64-bit platforms were default integers. This is the result of a long misunderstanding on my part. I've changed array indeces to a integer of pointer size in the front end and most of the runtime libraries. Haven't had a chance to test it yet.

I also baked the first batch of fudge with Bob Bauer's chocolate. The chocolate came in 9.75-ounce bars, which is a lot less than the 16 ounces I usually use, but the result looks normal even without scaling the recipe down. Will taste-test it tomorrow.


May 2

Doug Cox has built some new windows builds.


May 1

Doug Cox has built some new windows builds.

John Harper relayed a problem from Simon Geard with reading complex numbers in DECIMAL=COMMA mode that has been fixed.


April 30

Bob Bauer sent in an assortment of Scharffen Berger chocolates. About half baking chocolate and half eating chocolate. I tried one of the eating bars, and it was extremely good. Can't wait to do some baking with these.

Jens Bischoff found a crash on an invalid PARAMETER statement that has been fixed.

Lex Wennmacher discovered in a crash raising not-a-numbers to a power that has been fixed.


April 29

Reinhold Bader sent in a subtle problem with modules that has been fixed.

Keith Refson sent a crash on -fbounds-check that has been fixed.


April 20

Doug Cox has built some new windows builds.


April 17

Giorgio Pastore reported a problem with kind=10 exponentiation that has been fixed.

Aleksander Schwarzenberg-Czerny contributed some configuration files for running g95 with PGPLOT that are now available in the howto.

Doug Cox has built some new windows builds.


April 15

John Young pointed out a spelling mistak that has been fixed.

Andres Mujica pointed out that the INSTALL file in the binary builds was just a bunch of autoconf boilerplate. I've replaced it with the original INSTALL file from previous builds.

Philippe Marguinaud found a problem with contained procedures being confused with entry points that has been fixed. Philippe also noticed a variation of the F2003 PROCEDURE statement that has been implemented.


April 14

Doug Cox has built some new windows builds.


April 10

Al Grenolds pointed out a regression with yesterday's namelists in modules that has been fixed.

Doug Cox built some new windows builds.


April 9

John Robinson sent in a bug with namelist and modules that has been fixed.

Kris Kuhlman pointed out a pair of regressions that affected David Bailey's mpfun package that have been fixed.

Doug Cox has built some new windows builds.


April 8

John Young suggested a warning for recursive defined assignment that has been implemented. John also pointed out a problem with the NULLIFY statement that has been fixed.

Lionel Guez sent in a regression involving a missing error while passing a scalar to an assumed-shape array that has been fixed.


April 7

Alison Boeckmann sent in a regression involving I/O formats of arrays that has been fixed.


April 2

John Harper sent in a bug with the FLUSH statement that has been fixed.

Doug Cox has built some new windows builds.


April 1

John Young sent in a path problem with the C preprocessor that has been fixed.

Kristján Jónasson sent in a bug with allocatable array I/O formats that has been fixed.

John Peterson sent in a crash with respect to IEEE arithmetic that has been fixed.


March 31

Jun Saito reported that it was actuall Hiroshi Isakari who found the exponentiation bug from a couple days ago.


March 28

Doug Cox has built some new windows builds.


March 27

Martien Hulsen sent a crash on a multi-component array assignment that has been fixed.

Jun Saito and Kristján Jónasson pointed out a regression in exponentiation that has been fixed.

I've added support for the F2003 move_alloc() intrinsic.


March 26

Ugo Tartaglino reported a too-zealous constraint that has been relaxed.

Michael Duda sent in a bug with -r8 and ACOS that has been fixed.

Philippe Marguinau sent in a memory allocation bug that has been fixed.

The existing binaries are the last 0.91 version, I've bumped things to 0.92. The web pages have been updated. It's been way too long since the last stable release. I will do them more frequently in the future.


March 25

Finished the unix-specific and windows-specific parts of the library. The reformat is done.


March 21

Finished the math subsection of the runtime library.


March 20

Finished reformatting the I/O subsection of the runtime library.


March 19

Finished the intrinsics directory of the runtime library.


March 18

Finished the reformat on g95. My ideas on readability have changed somewhat since I started writing g95, and g95 is the last of my active projects to be altered to fit my new tastes.

The main thing is that I've been writing a lot more python. Python uses indentation instead of braces to indicate grouping, and I originally started writing python code with a basic indentation of two, but it was just too cramped. Eventually, the appreciation for four columns of python has translated itself into four columns of C. Although I try to keep the indentation level down anyhow, this is a good compromise that is readable, it lets you get plenty of stuff with an eighty column limit, yet still isn't the wacked-out eight column tabs.

My new fan arrived today, and has been installed. The airflow is huge compared with the old one, which apparently has been getting worse for a long time now.

On to the runtime library, which accounts for a quarter of g95.


March 17

Kept on working the reformat. My new cooling fan should arrive tomorrow.


March 16

Worked on the source reformat up through the t's. This is actually about 2/3rds of the way through the roughly 100 k-lines of source. It looks like the source files are slightly smaller that they were, due to more tabs being used in files.


March 14

John Harper pointed ou the typo involving my "cooking fan", which should of course been "cooling fan". Fixed.

I've continued on with the source reformat, I am up to source files starting with 'm'.


March 12

Henk Krus reported some new progress on running OpenGL with g95. Details can found at: http://www.dolfyn.net/dolfyn/f03gl_en.html I am up to the i's in the source renovation. A mispelling was fixed along the way.


March 11

The source renovation continues, up through the sources starting with 'd'. I've already found and fixed one bug, which was never flagged by the C compiler due to how C is parsed.


March 10

My laptop, on which g95 is developed, has a problem with its cooling fan. I have a new one on order, but bugs are going to have to wait. I'm taking the opportunity to call version 0.91 complete. The next will be 0.92. I am now working on reformatting the code a little to reflect some of my changing tastes-- I'm changing the basic indent to four characters from two, which was too squished. This may take a while, since there are lots of line here, and I don't trust automatic code-reindenters.


February 27

Doug Cox has built some new windows builds.


February 26

Daniel Koester sent in a crash on procedure pointers returning arrays that caused a crash. Fixed.


February 20

Joachim Geiger and Michael Richmond pointed out a crash on x86_64. I've also got a new build machine for x86_64.


Feburary 13

Michael Richmond and Joachim Geiger pointed out a build problem on x86_64 that has been fixed.

Pierre St-Laurent sent a gift of CAN $50.00. There was a little initial confusion at bank, but there are lots of Canadian visitors who come down to Arizona for the winter. Thanks Pierre!


February 7

Michael Richmond found a problem with the fix to module procedures that has been fixed.

Eduardo Mendes wrote a HOWTO article for using MATRAN with g95.

Takeshi Enomoto sent some updates to the Japanese manual that have been applied.

Doug Cox has built some new windows builds.


February 6

Kristján Jónasson found a crash on missing module procedures that has been fixed, and a crash on a bad NULLIFY statement also fixed.

Toby White was having some difficulties locating a memory leak, so I've added a printout of the address of leaked blocks.


January 29

Eric Johnson provided an alternative platform for linux/ppc builds. The old platform had a power supply problem.

Doug Cox has built some new windows builds.


January 28

Angelo Graziosi send Michael Richmond pointed out the the problem with kind=10 reals under cygwin still wasn't fixed. The problem turned out to be a case of automake not propagating CFLAGS correctly.

G&uunl;nter Spahlinger sent in a pair of small patches for compiling on interix that I've applied.

Doug Cox has built some new windows builds.


January 25

John Nabelek pointed out that list input with G95_IGNORE_ENDFILE was inconsistent with formatted reads. Fixed list input to stop throwing endfiles if G95_IGNORE_ENDFILE is set.

Angelo Graziosi, Doug Cox and Michael Richmond pointed out a build problem with kind=10 reals that has been (hopefully) fixed.


January 17

G&uunl;nter Spahlinger sent in a small patch for kind=10 reals that properly declares public subroutines.

John Reid requested a way to round small numbers to zero instead of going into denormalized numbers for the MMX floating point unit. I've added the G95_FPU_NO_DENORMALS environment variable. Denormals are a good idea for numerical calculations, but are apparently pretty slow. As usual, if you want to disable the training wheels, seat belts and air bags, g95 will let you do that.


January 16

Michael Richmond pointed out that configuration of g95 no longer matched that of the library. That was a result of upgrading the ancient redhat system on my laptop to a recent opensuse. The current source reflected the old autoconf, with the library hacked to make it work under the new settings. Fixed now.


January 15

John Harper pointed out a problem with kind=10 reals under freebsd. Freebsd starts processes with the 80387 precision control bits set to 53 instead of 64. I suspect this is because the freebsd people wanted to avoid the differing results when the additional precision is present. From a numerical perspective, the additional precision can save your calculation, so I've turned it back on by default.

Ron James sent in a gift of US $10. I spent it on some new ski boots, which I tried out yesterday. They work great.