https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63733

            Bug ID: 63733
           Summary: [OOP]  wrong resolution for OPERATOR generics
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sfilippone at uniroma2 dot it

Created attachment 33881
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33881&action=edit
test case

Hi,
The attached test case, slightly modified from an original by Alberto F.
Martin-Huertas in https://gcc.gnu.org/ml/fortran/2014-10/msg00124.html, changes
behaviour across versions; in particular, 4.7.3 seems correct and all other
versions I tried are not. 
According to Steve Lionel https://software.intel.com/en-us/forums/topic/534799 
the current Intel and gfortran behaviour is wrong, and this is also my
impression. 
We have not had a definite answer at 
https://groups.google.com/forum/#!topic/comp.lang.fortran/aFNK3FXqTUA

Again, my reading of the standard is that 4.7.3 is correct and the others are
wrong, but of course I will gladly accept a correction; either way, at least
one version of gfortran is wrong. 
------------------------------------------------------------------
[sfilippo@jacobi F2003]$ module switch gnu gnu/4.6.4
        gnu/4.6.4 - loads the GNU 4.6.4 compilers suite

        Version 4.6.4

[sfilippo@jacobi F2003]$ gfortran -o test_ov test_ov.f90
[sfilippo@jacobi F2003]$ ./test_ov 
 sum_parent
 sum_parent
 sum_child
[sfilippo@jacobi F2003]$ module switch gnu gnu/4.7.3
        gnu/4.7.3 - loads the GNU 4.7.3 compilers suite

        Version 4.7.3

[sfilippo@jacobi F2003]$ gfortran -o test_ov test_ov.f90
[sfilippo@jacobi F2003]$ ./test_ov 
 sum_parent
 sum_child
 sum_child
[sfilippo@jacobi F2003]$ module switch gnu gnu/4.8.3
        gnu/4.8.3 - loads the GNU 4.8.3 compilers suite

        Version 4.8.3

[sfilippo@jacobi F2003]$ gfortran -o test_ov test_ov.f90
[sfilippo@jacobi F2003]$ ./test_ov 
 sum_parent
 sum_parent
 sum_child
[sfilippo@jacobi F2003]$ module switch gnu gnu/4.9.1
        gnu/4.9.1 - loads the GNU 4.9.1 compilers suite

        Version 4.9.1

[sfilippo@jacobi F2003]$ gfortran -o test_ov test_ov.f90
[sfilippo@jacobi F2003]$ ./test_ov 
 sum_parent
 sum_parent
 sum_child
[sfilippo@jacobi F2003]$ module switch gnu gnu/5.0.0 
        gnu/5.0.0 - loads the GNU 5.0.0-pre compilers suite

        Version 5.0.0

[sfilippo@jacobi F2003]$ gfortran -o test_ov test_ov.f90
[sfilippo@jacobi F2003]$ ./test_ov 
 sum_parent
 sum_parent
 sum_child
[sfilippo@jacobi F2003]$

Reply via email to