Hi Mikael, Am 07.07.23 um 14:21 schrieb Mikael Morin:
I'm attaching what I have (lightly) tested so far, which doesn't work. It seems gfc_conv_class_to_class reevaluates part of the original expression, which is not correct after deallocation.
this looks much more elegant than my attempt that passed an additional argument to gfc_conv_class_to_class, to achieve what your patch does.
Will have a look again tonight.
Great. Harald