Re: Allocatable arrays in derived types
- From: paul.richard.thomas@xxxxxxxxx
- Date: Tue, 29 Apr 2008 22:25:33 -0700 (PDT)
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
.
- Follow-Ups:
- Re: Allocatable arrays in derived types
- From: James Van Buskirk
- Re: Allocatable arrays in derived types
- References:
- Allocatable arrays in derived types
- From: Gib Bogle
- Re: Allocatable arrays in derived types
- From: Arjen Markus
- Re: Allocatable arrays in derived types
- From: relaxmike
- Re: Allocatable arrays in derived types
- From: Richard Maine
- Re: Allocatable arrays in derived types
- From: relaxmike
- Re: Allocatable arrays in derived types
- From: James Van Buskirk
- Allocatable arrays in derived types
- Prev by Date: Re: gfortran produces huge executables
- Next by Date: Re: Allocatable arrays in derived types
- Previous by thread: Re: Allocatable arrays in derived types
- Next by thread: Re: Allocatable arrays in derived types
- Index(es):