public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55638] New: Wrongly accepts INTENT + VALUE - and wrongly requires it for PURE
@ 2012-12-10 11:42 burnus at gcc dot gnu.org
  2012-12-14 16:57 ` [Bug fortran/55638] " burnus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-12-10 11:42 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55638
           Summary: Wrongly accepts INTENT + VALUE - and wrongly requires
                    it for PURE
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


"C558  An entity with the VALUE attribute shall not have the ALLOCATABLE,
INTENT (INOUT), INTENT(OUT), POINTER, or VOLATILE attributes." (F2008)

"C1276 The specification-part of a pure function subprogram shall specify that
all its nonpointer dummy data objects have the INTENT (IN) or the VALUE
attribute."


However, gfortran allows to combine INTENT with VALUE.

Additionally, for PURE (and PURE ELEMENTAL) procedures, it even requires the
INTENT besides the VALUE. Namely:

  elemental subroutine foo(x,y)
                              1
Error: Argument 'y' of elemental procedure 'foo' at (1) must have its INTENT
specified




  elemental subroutine foo(x,y)
    integer, intent(inout) :: x
!    integer, VALUE, INTENT(in)  :: y
    integer, VALUE  :: y
    x = y
  end subroutine foo


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

end of thread, other threads:[~2012-12-16 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-10 11:42 [Bug fortran/55638] New: Wrongly accepts INTENT + VALUE - and wrongly requires it for PURE burnus at gcc dot gnu.org
2012-12-14 16:57 ` [Bug fortran/55638] " burnus at gcc dot gnu.org
2012-12-15 23:26 ` burnus at gcc dot gnu.org
2012-12-16 10:54 ` burnus at gcc dot gnu.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).