Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161421 - gfortran produces error when compiling a module that declares interface procedures. The interfaces are not recognized in the module where they are declared
Summary: gfortran produces error when compiling a module that declares interface proce...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL: gfortran module interface
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-23 08:25 UTC by paulo
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-07 15:51:05 UTC


Attachments (Terms of Use)

Description paulo 2005-06-23 08:25:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
gfortran produces error when compiling a module that declares interface procedures. The interfaces are not recognized in the module where they are declared

Version-Release number of selected component (if applicable):
gcc-4.0.0-8

How reproducible:
Always

Steps to Reproduce:
1.gfortran -c m_interface.f90
2.
3.
  

Actual Results:  In file m_interface.f90:31

        l = len(s)
              1
Error: Symbol 'len' at (1) has no IMPLICIT type


Additional info:

This is a simple module that I created to reproduce the problem.

module m_interface
implicit none
	type string
       		private
          	integer                 :: len = 0
          	integer                 :: size = 0
          	character, pointer      :: chars(:) => null()
	end type string

interface len
          module procedure len_s
end interface

contains

      elemental function len_s(s)
          implicit none
          type(string), intent(in)  :: s
          integer                   :: len_s

          len_s = s%len
      end function len_s

      subroutine getLen(s)
	type(string), intent(inout) :: s
        integer :: l
        
        l = len(s)	
      end subroutine
	
end module m_interface

Comment 1 Jakub Jelinek 2005-07-07 15:51:05 UTC
Can you please file this problem upstream instead?  It is present on today's
GCC CVS HEAD as well.  http://gcc.gnu.org/bugzilla/
Thanks.


Note You need to log in before you can comment on or make changes to this bug.