[Patch, fortran] PR fortran/100029 - ICE on storage_size with polymorphic argument, PR fortran/100040 - Wrong code with intent out assumed-rank allocatable
José Rui Faustino de Sousa
jrfsousa@gmail.com
Mon Apr 12 01:13:29 GMT 2021
Hi All!
Proposed patch to:
PR100040 - Wrong code with intent out assumed-rank allocatable
PR100029 - ICE on subroutine call with allocatable polymorphic
assumed-rank argument
Patch tested only on x86_64-pc-linux-gnu.
Made sure the code also recognized assumed-rank arrays as full arrays.
Changed the order of free and class to class conversion so that the free
occurs first so that there are no problems with freeing an unexpected
type of transformed class.
Thank you very much.
Best regards,
José Rui
Fortran: Fix ICE and wrong code emission [PR100029, PR100040]
gcc/fortran/ChangeLog:
PR fortran/100040
* trans-expr.c (gfc_conv_class_to_class): add code to have
assumed-rank arrays recognized as full arrays and fix the type
of the array assignment.
PR fortran/100029
* trans-expr.c (gfc_conv_procedure_call): change order of code
blocks, such that the free occurs first.
gcc/testsuite/ChangeLog:
PR fortran/100029
* gfortran.dg/PR100029.f90: New test.
PR fortran/100040
* gfortran.dg/PR100040.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR100040.patch
Type: text/x-patch
Size: 4772 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20210412/5e736fa6/attachment.bin>
More information about the Fortran
mailing list