[Bug fortran/43366] [OOP][F2008] Intrinsic assign to polymorphic variable
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 11 19:43:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43366
--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-11 19:38:23 UTC ---
(In reply to comment #10)
> The following patch makes the test case in comment #3 work correctly:
I think your current patch only works if declared type (LHS) == effective type
RHS. I think you need to use the size of the effective types ("_size"). The
change should be in trans-expr.c's alloc_scalar_allocatable_for_assignment. Cf.
"Determine allocate size" in trans-stmt.c's gfc_trans_allocate
(In reply to comment #11)
> Stupid question, but shouldn't it be possible to replace the call to
> 'is_scalar_reallocatable_lhs' by a check for the allocatable attribute?
I guess so - though I have not studied the code.
More information about the Gcc-bugs
mailing list