logical (c_bool) function with bind (c)

Alexei Matveev matveev@theochem.tu-muenchen.de
Thu Jun 6 13:38:00 GMT 2013


On 06/06/2013 02:47 PM, Tobias Burnus wrote:
> 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.
>
>

Thanks!  This isn't critical, as workarounds are simple: either compile
with optimization and/or add a noop change to the while condition

     do while (.true. .and. get (...))

Though I also think a backport would be appropriate if the 4.7 branch
is not considered closed yet.

Alexei





More information about the Fortran mailing list