This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Doubt w.r.t. to gfortran's interpretation of the Fortran2003 standard


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]