forrtl: severe (173): A pointer passed to DEALLOCATE points to an array that cannot be deallocated here is the sample code. I used compiler version 11.1.054 MODULE SHAPES PRIVATE TYPE, PUBLIC, ABSTRACT :: SHAPE CONTAINS PROCEDURE(DRAW), DEFERRED :: DRAW END TYPE TYPE, PUBL...
The pointer `b` in the code above has a proper internal array descriptor, and can be used as an alias to the array `a` in all cases, it seems, with the one exception that `b` cannot be deallocated. From the Intel Compiler Guide on c_f_pointer , the Intel beha...
This is the key idea of a smart pointer such as std::unique_ptr<int> upInt(new int()) and will not hold in the counterexample from the guidelines. If the allocation of the buffer fails, the file handle will be lost. void f(const std::string& name) { FILE* f = fopen(name, "...
forrtl: severe (173): A pointer passed to DEALLOCATE points to an array that cannot be deallocatedhere is the sample code. I used compiler version 11.1.054MODULE SHAPES PRIVATE TYPE, PUBLIC, ABSTRACT :: SHAPE CONTAINS PROCEDURE(DRAW), DEFERRED :: DRAW END TYPE TYPE, PUBLIC, EXTENDS(SHAPE)...
If/when the array/pointer is located it is deallocated. If/when the associated entry is not found, the Fortran code calls the (your) C routine to perform the delete. I suggest you call a shell function you write that can optionally check a list/table to see i...