This patch comes in two versions: submit.diff with Change.Logs or submit2.diff with Change2.Logs. The first fixes the problem by changing array temporaries from class expressions into class temporaries. This permits the use of gfc_get_class_from_expr to obtain the vptr for these temporaries and all the good things that come with that when handling dynamic types. The second part of the fix is to use the array element length from the class descriptor, when reallocating on assignment. This is needed because the vptr is being set too early. I will set about trying to track down why this is happening and fix it after release. The second version does the same as the first but puts in place a load of tidying up that is permitted by the fix to class array temporaries. I couldn't readily see how to prepare a testcase - ideas? Both regtest on FC33/x86_64. The first was tested by Dominique (see the PR). OK for master? Regards Paul