------- Additional Comments From erik dot edelmann at iki dot fi  2005-07-27 
13:00 -------
(In reply to comment #7)
> Subject: Re:  interface body has incorrect scope
> 
> Paul, do you have any idea what find_special could be intended for?  It seems
> obvious that it does the wrong thing in the case of this PR, and I can't see
> any case where it would be needed, but I would be surprised if there's no
> intent behind it, and in another compiler the function is still present, does
> the same thing, and is called in the same places.  Are there maybe any other
> changes in symbol handling compensating for this?

I've taken a look at "another compiler" (i.e. g95).  The difference is in 
(gfc|g95)_match_interface().  While we do

    case INTERFACE_GENERIC:
      
          <...>

          current_interface.sym = gfc_new_block = sym;

g95 does:

    case INTERFACE_GENERIC:    

        <...>

        g95_new_block = NULL;

The result of this is that in find_special(), when we get to the point

    if (s->state != COMP_INTERFACE || s->sym == NULL)
        goto normal;   /* Nameless interface */

(or corresponding point in gfortran source code), g95 will 'goto normal', while
we continue. In other words; g95 treats generic interfaces as nameless
interfaces.  This brings me to a question: what is a "named interface"?  I had
assumed that it would the same thing as a generic interface, but in g95 code it
is apperantly not.

-- 


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

Reply via email to