Re: [PATCH] Fortran: fix reallocation on assignment of polymorphic variables [PR110415]

2023-11-20 Thread Tobias Burnus
Hi Andrew, On 20.11.23 14:56, Andrew Jenner wrote: This patch adds the testcase from PR110415 and fixes the bug. Thanks. I can confirm experimentally that it fixes the original PR. However, if I extend the original testcase (-2), it fails with run with valgrind or when run with

[PATCH] Fortran: fix reallocation on assignment of polymorphic variables [PR110415]

2023-11-15 Thread Andrew Jenner
This patch adds the testcase from PR110415 and fixes the bug. The problem is that in a couple of places in trans_class_assignment in trans-expr.cc, we need to get the run-time size of the polymorphic object from the vtbl, but we are currently getting that vtbl from the lhs of the assignment