[Bug fortran/57456] [OOP] CLASS + CHARACTER ALLOCATE with typespec: For arrays, the typespec is ignored

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 27 21:46:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57456

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #3)
> Is not this PR supposed to have been fixed (partially) by revision 199528?

Yes. The patch fixes the derived-type issue - but it doesn't solve the
CHARACTER issue. As written in comment 2, the proper way is use one common code
in gfc_trans_allocate, which calculates the byte size, and use it both for
scalars (directly in gfc_trans_allocate) and for arrays in gfc_array_allocate
-> gfc_array_init_size. (One also should evaluate the LEN= expression only
once.)



More information about the Gcc-bugs mailing list