public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30034]  New: pure subroutine requires intent for procedure argument
@ 2006-12-01  0:59 trumsko at yahoo dot com
  2006-12-04 23:31 ` [Bug fortran/30034] " pault at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: trumsko at yahoo dot com @ 2006-12-01  0:59 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-10 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-01  0:59 [Bug fortran/30034] New: pure subroutine requires intent for procedure argument trumsko at yahoo dot com
2006-12-04 23:31 ` [Bug fortran/30034] " pault at gcc dot gnu dot org
2006-12-27 19:35 ` patchapp at dberlin dot org
2006-12-28 18:41 ` pault at gcc dot gnu dot org
2007-01-06 14:14 ` [Bug fortran/30034] [4.2 and 4.1 only] " pault at gcc dot gnu dot org
2007-01-06 14:15 ` [Bug fortran/30034] [4.1 " pault at gcc dot gnu dot org
2007-01-10 19:08 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).