Hi Andre, > attached is a patch to fix the incorrect computation of memory needed in a > polymorphic assignment. Formerly the memory required could not be determined > and therefore one byte was allocated. This is fixed now, by retrieving the > size needed from the _vptr->size. > > Bootstraps and regtests ok on x86_64-linux/f23. Ok for trunk?
Two questions after quickly skimming over it ... 1) After adding that code block in gfc_trans_assignment_1, it seems like the comment above is outdated, right? 2) Wouldn't it be better to move this block, which does the correct allocation for CLASS variables, into "alloc_scalar_allocatable_for_assignment", where the allocation for all other cases is done? Cheers, Janus > Regards, > Andre > -- > Andre Vehreschild * Email: vehre ad gmx dot de