I am getting some uninitialized memory access errors with a derived type containing allocatable arrays which I believe are false positives.
If I use a subroutine with an intent(out) parameter to initialize the derived type and allocate its member arrays, the Inspector does not complain. However, if I have a function which returns the object the very same code gives an Intel Inspector error in memcpy.asm during the allocate() statement. I'm no expert but at the point of the error, the arrays in question are supposed to be unitialized; they're inside an allocate statement ....
Besides the Inspector errors, I have another Inspector warning which I cannot explain and which also seems like a false positive. My objects have a final subroutine which is being called to deallocate the member arrays as the object loses scope; this routine gets called correctly as I can step through it in the debugger. If I create my object inside a foo() subroutine, the Inspector reports everything is OK on that point but creating the object directly inside the program block gives a warning about unallocated memory when the program exits.
Attached to this is test source file to reproduce the errors and the corresponding Intel Inspector log (mi3). Compilation environment is 32-bit Debug with Visual Studio 2008 SP1 and Intel(R) Composer XE 2013 SP1 Update 2 (package 176). The Intel Inspector is Update 9 (build 328075).
The code itself runs correctly as far as I can tell and I would prefer to use the function style instead of subroutines since it would clarify the rest of the program later on.