logical (c_bool) function with bind (c)

Tobias Burnus burnus@net-b.de
Thu Jun 6 12:47:00 GMT 2013


Alexei Matveev wrote:
> I came across an compiler error at -O0 for a BIND (C) function
> that returns a logical (c_bool). At -O1 the compilation passes.
> Is this something known/fixed?

The bug is a regression as GCC 4.6 was fine. The issue was solved for 
GCC the developer version (= 4.8), cf. 
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54370 - thus it works on GCC 
4.8 and GCC 4.9.

As it was a regression, it should have been backported to the GCC 4.7, 
which wasn't done. It was probably forgotten. It should have been marked 
as regression (to turn up in regression queries) - [or it should have 
been closed - in case backporting wasn't intended, which hasn't be done 
either]. It still can be solved on the GCC 4.7 branch, but I don't 
expect that the update will propagate to many GCC/gfortran users.


As a work around, you could try a newer GCC version (GCC 4.8 - or the 
developer versions of GCC 4.9) - though, using GCC 4.6 would work as well.

* Debian permits to install GCC 4.6 along side other GCC versions
* Debian testing/unstable offers GCC 4.8
* You can install your own GCC in some extra directory, either a binary 
or self compiled. See http://gcc.gnu.org/wiki/GFortranBinaries

Sorry for the regression!

Tobias

PS: If we had done the backport in August 2012 - it would have been 
before the 4.7.2 release (2013-09-20), which is available on the TUM 
system ...



More information about the Fortran mailing list