allocate on assignment problem
marco restelli
mrestelli@gmail.com
Thu Sep 4 17:32:00 GMT 2008
On Thu, Sep 4, 2008 at 6:22 PM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Tobias and Marco,
>
>> Hmm, I re-read the bug report,
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35810, and seemingly there are
>> additional issues: Not all reallocations seem work for derived types; those
>> with constructors do work.
>
> That's the way in which alloctable components are implemented. It
> looks like derived type with alloc comps = derived type with alloc
> comps.
>>
>> For the time being, I would (re)allocate by hand. Also other compilers such
>> as ifort do not support reallocation with the default options (ifort does
>> support it with -assume realloc_lhs [the reason is that this slows down all
>> programs - and since only program did not use it]).
>>
>> As GCC/gfortran is now in stage3 (only bug fixes), I think the support will
>> be deferred to GCC 4.5. The chances are very high that this feature will be
>> implemented in 4.5.
>
> We will need all the allocatable enhancements to make classes work
> correctly, including allocate on assignment and scalar allocation.
> So, yes, I would say that the prospects are very high that 4.5 will
> see these features.
>
> Paul
Tobias, Paul,
thank you for clarifying this issue to me. For the time being I am
fine allocating by hand, and I am looking forward to getting the newer
version.
Best regards
Marco
>
>
> --
> 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