[Patch, fortran] 99307 - FAIL: gfortran.dg/class_assign_4.f90 execution test

Paul Richard Thomas paul.richard.thomas@gmail.com
Fri Mar 26 16:30:23 GMT 2021


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change.Logs
Type: application/octet-stream
Size: 674 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210326/af187901/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change2.Logs
Type: application/octet-stream
Size: 1372 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210326/af187901/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 5943 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210326/af187901/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit2.diff
Type: text/x-patch
Size: 16056 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210326/af187901/attachment-0003.bin>


More information about the Gcc-patches mailing list