Re: Allocatable arrays in derived types



James,

And indeed ifort 9.1 seems to point at the original address. You
need the extra level of indirection to see this issue with gfortran
because when str1 was called directly in this example the string
didn't end up getting munged. Is gfortran correct to treat
x(:)(1:3) as a variable or does it need to express strides in
bytes rather than element storage units so that it could express
a pointer to it correctly?

There is a mechanism in gfortran for handling pointers whose strides
are not in element storage units. Unfortunately, it is broken for the
extra level of indirection, as you point out. This is in our bug
database as PR34640 and has been waiting for me to find the time to
fix it. I have been casting around for a way to do it that does not
require modification of the ABI for passing every other type of array.
You might imagine that this would be a rather mammoth task:) I have a
scheme for doing it in mind that is awaiting testing.

Cheers

Paul
.