- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I try to compile the code below, I get an error that points MOVE_ALLOC as a non-pure procedure. Is that the real issue (i.e., a bug), or maybe there's something else wrong in the code that I fail to detect?
Thanks!
Thanks!
[vb]module mod2 implicit none contains pure subroutine reallocate(array, bound) real, allocatable, intent(INOUT) :: array(:) real, allocatable :: aux(:) integer, intent(IN) :: bound integer :: ub continue if (ALLOCATED(array)) then ub = SIZE(array) call MOVE_ALLOC(array, aux) allocate(array(1:bound)) array(1:MIN(ub, bound)) = aux(1:MIN(ub, bound)) deallocate(aux) else allocate(array(1:bound)) endif end subroutine end module mod2 [/vb]
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wow. How did we miss that one? Compiler bug. MOVE_ALLOC is pure. It and MVBITS are the only pure intrinsic subroutines. I'll report that to the developers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Wow. How did we miss that one? Compiler bug. MOVE_ALLOC is pure. It and MVBITS are the only pure intrinsic subroutines. I'll report that to the developers.
Has this been fixed yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - fixed in 11.1.

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