The only way to allocate aligned memory in standard Fortran is to allocate it with an external C function, like the fftw_alloc_real and fftw_alloc_complex functions Fortunately, Fortran 03 provides a simple way to associate such allocated memory with a standard Fortran array pointer that you can then use normallyDuring execution of the assignment statement, the variable S is precleared to blank, and then zero characters are moved into S, so S contains one blank; While Fortran 08 has C633 (R631) If allocateobject is an array either allocateshapespeclist shall appear or sourceexpr shall appear and have the same rank as allocateobject If allocateobject is scalar, allocateshapespeclist shall not appear C638 (R626) Each allocateobject shall be type compatible (4313) with sourceexpr
Pdf Avoiding Memory Leaks With Derived Types