[PATCH, Fortran] PR fortran/60289 First try on: Fixing character array allocation for class(*) type variable
Paul Richard Thomas
paul.richard.thomas@gmail.com
Mon Aug 18 08:36:00 GMT 2014
Dear All,
There are known issues with unlimited polymorphic variables
representing characters : see
https://groups.google.com/forum/#!topic/comp.lang.fortran/aRz3HMpblTs
and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
One way or another, the variable itself needs to carry the string
length and the kind. With fixed length and kind=1, the vtable 'size'
does the job.
Tobias has suggested more than once that we use the new array
descriptor as the class container as well. We either do this or add
fields to the class container.
Cheers
Paul
On 17 August 2014 18:39, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
>> Here is a failing testcase.
>
> I was about to post the same test. The test fails with two counts:
> (1) len(P) == 80,
> (2) deallocate(P) fails with
>
> a.out(882,0x7fff75e1d310) malloc: *** error for object 0x7fc801c04978: incorrect checksum for freed object - object was probably modified after being freed.
> ...
>
> Dominique
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Fortran
mailing list