This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30034] New: pure subroutine requires intent for procedure argument
- From: "trumsko at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2006 00:59:36 -0000
- Subject: [Bug fortran/30034] New: pure subroutine requires intent for procedure argument
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following declaration
pure subroutine s_one ( anum, afun )
integer, intent(in) :: anum
interface
pure function afun (k) result (l)
implicit none
integer, intent(in) :: k
integer :: l
end function afun
end interface
results in the error (using lates build of gfortran-4.3):
Error: Argument 'afun' of pure subroutine 's_one' at (1) must have its INTENT
specified
The section 12.6 of ISO/IEC 1539-1 says:
Constraint: The specification-part of a pure function subprogram shall specify
that all dummy arguments have INTENT (IN) except procedure arguments and
arguments with the POINTER attribute.
which as far I understand means theat the code above is corrent (without intent
statement for 'afun'.
Cheers, T.
--
Summary: pure subroutine requires intent for procedure argument
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: trumsko at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30034