Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Error in arguments of MOVE_ALLOC

$
0
0

Dear all,

When compiling the following code, I get an error that the argument of MOVE_ALLOC shall be an allocatable object:

error #8195: The argument to the MOVE_ALLOC intrinsic subroutine shall be an allocatable object.   [MOVE_ALLOC]

In this example both arguments are allocatable:

FUNCTION Test_MoveAllocFunc(newSize) RESULT(idPS) !{
   !** HEADER VARIABLES/ARGUMENTS
    IMPLICIT NONE
    INTEGER :: newSize
  
  !** RETURN VARIABLE
    INTEGER :: idPS
  !** LOCAL VARIABLES
    TYPE(PSType), POINTER :: TempPS(:)
    TYPE (PSType), POINTER :: UI_PS(:)=>null()
  !*****************************************************************************
    TempPS=>null()
    ALLOCATE(TempPS(-1:newSize-1), SOURCE=UI_PS)
    DEALLOCATE(UI_PS)
    ALLOCATE(UI_PS(-1:newSize))
    
    CALL MOVE_ALLOC(TempPS, UI_PS)
    idPS=newSize
    
  ENDFUNCTION Test_MoveAllocFunc !}

What am I missing?

I am using windows 7x64, VS2010, Composer 2013 latest update.

Thanks for any help.

Dirk


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>