This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, Fortran] PR fortran/60289 First try on: Fixing character array allocation for class(*) type variable


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]