http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59720
Bug ID: 59720
Summary: Re: f2003/f2008, class/extends, multiple gemeric
assignment
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: kapinos at rz dot rwth-aachen.de
Created attachment 31773
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31773&action=edit
the attaches source cannot be compiled
As Janus Weil <janus(at)gcc.gnu.org> recommends in
http://gcc.gnu.org/ml/fortran/2014-01/msg00048.html
.. here the ticket.
> please take a look at the attached example. It cannot be compiled using the
> gfortran/4.8.1:
>
>> $ gfortran -c ___MOD_paul.f90
>> ___MOD_paul.f90:42.42:
>>
>> generic :: assignment(=) => assign2
>> 1
>> Error: 'ass_gf' and 'ass_en' for GENERIC '=' at (1) are ambiguous
>
> Actually this code piece is derived from an real world code which is
> developed using Intel compiler (may be compiled with ifort, runs OK) and the
> actual prevents from porting the code (being still in development) to
> 'gfortran'.
>
> Well, let's take a look at the code.
> - module 'kleiner' is no problem - can be compiled when in own file. Type
> 'mytype' is defined and '=' is bound to this type.
> - module 'grosser' is meant to be a subclass of 'kleiner': the type
> 'zwotype' extends the type 'mytype'. Again '=' should be bound to the new
> (derived) type 'zwotype' - and this fals.
>
> Well, as said the Intel's "ifort" compile this with no warnings and AFAIK
> the code also runs well. The question now is:
> - is that some Intel's extension, or
> - is that an Fortran 2003/2008 feature still not supported in gfortran, or
> - is the code in any way not Fortran-standard complying?
I think it's a bug in gfortran. Could you file a PR in bugzilla, please?
Thanks,
Janus