public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* argument without intent gives error in impure elemental
@ 2016-03-03 22:25 Damian Rouson
  0 siblings, 0 replies; only message in thread
From: Damian Rouson @ 2016-03-03 22:25 UTC (permalink / raw)
  To: Fortran List; +Cc: Clune Tom


GFortran Developers,

Could someone please confirm whether the error message below is correct or should be submitted in a bug report?  I’m guessing that the compiler is accepting the “impure” syntax but not correspondingly relaxing the restrictions  imposed on pure elemental procedures.

Damian


$ cat foo.f90 
contains
  impure elemental subroutine foo(i)
    integer i
  end subroutine
end 

$ gfortran foo.f90 
foo.f90:2:35:

   impure elemental subroutine foo(i)
                                   1
Error: Argument 'i' of elemental procedure 'foo' at (1) must have its INTENT specified or have the VALUE attribute

$ gfortran --version
GNU Fortran (MacPorts gcc6 6-20160228_0) 6.0.0 20160228 (experimental)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-03 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-03 22:25 argument without intent gives error in impure elemental Damian Rouson

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).