- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When I remove the PURE prefix, the code below compiles just fine. With the PURE prefix, however, I get the error message: "The dummy argument of a derived type containing a pointer component has the INTENT(IN) attribute therefore it shall not appear as the expr of an assignment-stmt in a PURE procedure". Is the compiler right at complaining? The error message seems kind of misleading, by the way ---since the argument's attribute is INTENT(INOUT).
!---------------------------------------------------------------------
module mod1
implicit none
type, public :: struct
integer :: item = 0
type(struct), pointer :: next(:) => NULL()
end type
contains
pure subroutine dummy(array)
type(struct), allocatable, intent(INOUT) :: array(:)
array(1:) = array(1:)
end subroutine
end module mod1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page