------- Additional Comments From erik dot edelmann at iki dot fi  2005-07-28 
09:06 -------
(In reply to comment #12)
> > > interfaces.  This brings me to a question: what is a "named interface"?  I
> 
> This is a nameless interface, isn't it?
> 
> module snafu
>   interface
>     subroutine really_snafu (foo)        
>       integer, intent (inout)  :: foo
>     end subroutine really_snafu
>   end interface
> end module snafu
> 
> This compiles correctly with gfc.  A named interface, therefore, is the same
> thing but with a name.  I don't know what this does for us.  A generic
> interface, is a named interface that contains variants for different types.

I did som checking ...

The (draft) f2k standard apperantly considers interfaces with names to be
generic interfaces, even when the interface block contains only one procedure.

This view also agres with the sources of g95 and gfortran; we have 4 different
types of interfaces (defined in gfortran.h):

typedef enum 
{
  INTERFACE_NAMELESS=1,    INTERFACE_GENERIC,
  INTERFACE_INTRINSIC_OP,  INTERFACE_USER_OP
} 
inteface_type; 

The only one of these that can have a name is INTERFACE_GENERIC, which is
treated as "nameless" in find_special() by g95.  This means that either
find_special() is meaningless in g95, or g95 has a bug. In the latter case, we
would most likely introduce the same bug in gfortran with my patch.  I'm,
however, becoming more and more convinced that find_special() is meaningless (in
both compilers) (but I'm not 100 % sure of course).

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20363
  • [Bug fortran/20363]... erik dot edelmann at iki dot fi

Reply via email to