This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/39295] New: [4.2/4.3/4.4 Regression] Too strict interface conformance check


Reported by Jon Hurst at http://gcc.gnu.org/ml/fortran/2009-02/msg00152.html

Said to compile with 4.0.3, rejected with 4.1/4.2/4.3/4.4.
Compiles with NAG f95, ifort, g95, sunf95, openf95 and pgf90.

At a glance, it looks valid but I have not checked thoroughly.

Test case by Jon Hurst:

MODULE  funcs
CONTAINS
  INTEGER FUNCTION test1(a,b,opfunc) 
    INTEGER :: a,b
    INTEGER, EXTERNAL :: opfunc
    test1 = opfunc( a, b ) 
  END FUNCTION test1
  INTEGER FUNCTION sumInts(a,b)
    INTEGER :: a,b
    sumInts = a + b
  END FUNCTION sumInts
END MODULE funcs

PROGRAM test
  USE funcs 
  INTEGER :: rs
  INTEGER, PARAMETER :: a = 2, b = 1
  rs = recSum( a, b, test1, sumInts )
  write(*,*) "Results", rs
CONTAINS
  RECURSIVE INTEGER FUNCTION recSum( a,b,UserFunction,UserOp ) RESULT( res )
    IMPLICIT NONE
    INTEGER :: a,b
    INTERFACE 
       INTEGER FUNCTION UserFunction(a,b,opfunc) 
         INTEGER :: a,b
         INTEGER, EXTERNAL :: opfunc
       END FUNCTION UserFunction
    END INTERFACE
    INTEGER, EXTERNAL :: UserOp 

    res = UserFunction( a,b, UserOp )

    if( res .lt. 10 ) then
       res = recSum( a, res, UserFunction, UserOp ) 
    end if
  END FUNCTION recSum
END PROGRAM test


-- 
           Summary: [4.2/4.3/4.4 Regression] Too strict interface
                    conformance check
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39295


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