This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: logical (c_bool) function with bind (c)
- From: Alexei Matveev <matveev at theochem dot tu-muenchen dot de>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, Bo Li <lib at theochem dot tu-muenchen dot de>
- Date: Thu, 06 Jun 2013 15:38:21 +0200
- Subject: Re: logical (c_bool) function with bind (c)
- References: <51AF523A dot 4020606 at theochem dot tu-muenchen dot de> <51B084CB dot 2030802 at net-b dot de>
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