Doubt w.r.t. to gfortran's interpretation of the Fortran2003 standard
"Alberto F. Martín Huertas"
amartin@cimne.upc.edu
Fri Oct 31 10:26:00 GMT 2014
Dear Salvatore,
I agree with your personal feeling. However, I also agree it
is better to get other opinions. I already posted the query
to comp.lang.fortran googlegroups. I will let you know the
findings.
Best regards,
Alberto.
On 31/10/14 11:11, Salvatore Filippone wrote:
> I guess this behaviour is sufficiently ambiguous to warrant posting to
> comp.lang.fortran.
> My personal feeling is that the correct behaviour is that of the IBM
> compiler with the second generic commented out, but I recommend
> getting other opinions.
> Salvatore
>
> On Fri, Oct 31, 2014 at 11:00 AM, "Alberto F. MartÃn Huertas"
> <amartin@cimne.upc.edu> wrote:
>> If I comment out the second generic, the output 'sum_madres' is ALSO
>> produced by the Intel compiler
>> However, the IBM compiler outputs 'sum_hijos".
>>
>> If I do NOT comment out the second generic, the Intel and IBM
>> can compile the code, and the expression produces 'sum_hijos", while
>> the gfortran compiler does not compile the code.
>>
>> So, my question now is, assuming that the second generic is NOT LEGAL
>> (according to Metcalf, Reid and Cohen and F2003 handbook), should
>> the expression
>>
>> hres => h1 + m1 ! with h1 being type(hijo)
>>
>> output 'sum_madres' or 'sum_hijos' ?
>>
>> Best regards,
>> Alberto.
>>
>>
>>
--
Alberto F. MartÃn-Huertas
Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE)
Parc Mediterrani de la Tecnologia, UPC
Esteve Terradas 5, Building C3, Office 215,
08860 Castelldefels (Barcelona, Spain)
Tel.: (+34) 9341 34223
e-mail: amartin@cimne.upc.edu
________________
IMPORTANT NOTICE
All personal data contained on this mail will be processed confidentially and registered in a file property of CIMNE in
order to manage corporate communications. You may exercise the rights of access, rectification, erasure and object by
letter sent to Ed. C1 Campus Norte UPC. Gran Capitán s/n Barcelona.
More information about the Fortran
mailing list