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/37254] Reject valid PROCEDURE statement with implicit interface



------- Comment #3 from janus at gcc dot gnu dot org  2008-08-27 19:52 -------
Also the following version of Dominique's test case gives the same error, using
PROCEDURE statements without the POINTER attribute:

  real function proc3( arg1 )
     integer :: arg1
     proc3 = arg1+7
  end function proc3

program myProg
  PROCEDURE () :: proc3
  call proc4( proc3 )

  CONTAINS

  subroutine proc4( arg1 )
     PROCEDURE(real) :: arg1
     print*, 'the func: ', arg1(0)
  end subroutine proc4

end program myProg

The error also appears for PROCEDURE() :: arg1. It goes away, however, if proc3
is declared as PROCEDURE(real), regardless of whether arg1 has an explicit or
implicit return type.


-- 

janus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Reject valid (?) procedure  |Reject valid PROCEDURE
                   |pointer                     |statement with implicit
                   |                            |interface


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


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