http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48858

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-04 
08:23:41 UTC ---
(In reply to comment #0)
> This code should compile.  There is only one "entity" with the binding lablel
> "Cfun".  In the words in the standard, only one "entity of the program" with
> this binding label.  The names cfunc2 and cfunc1 are both local identifiers.
> (Sections 16.2 and 16.3).
> 
> This construction is specifically allowed in the standard to allow users to
> call a C function with multiple interfaces, similar to what is illustrated
> here.

I think I have to re-read that standard; I once got the impression that it
wasn't allowed to have two different interfaces pointing to the same entity.


(In reply to comment #1)
[BIND(C) with OPTIONAL arguments]
> The Intel and PGI compilers already support this (no compile errors, correct
> output).

Having a correct output is probably not surprising as most Fortran compilers
already handle OPTIONAL internally by passing a NULL pointer. Thus, also for
gfortran it would only a few lines (allowing it unless -std=f95/f2003/f2008 is
specified - and rejecting with BIND(C) the combination of OPTIONAL with VALUE).
I was thinking of introducing an flag -std=f2008tr, which will allow F2008 with
the two TR, which are being drafted: TR 29113 and the coarray TR.

It's on my agenda (cf. PR 48820 and http://gcc.gnu.org/wiki/TR29113Status), but
as it is a post-F2008 item, I thought I wait for the PDTR or FDTR and
concentrate until then on, e.g., coarrays.

Reply via email to