[Patch, fortran] PR97612 [F08] Structure constructor of type with nested allocatable array components fails to compile

Paul Richard Thomas paul.richard.thomas@gmail.com
Mon Dec 28 17:03:46 GMT 2020


Hi All,

Another one bites the dust! The patch is commented such that it is
self-explanatory.

Regtests on FC33/x86_64 - OK for master?

Paul

Fortran: Correct missing structure constructor comps. [PR97612].

2020-12-27  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/97612
* primary.c (build_actual_constructor): Missing allocatable
components are set unallocated using EXPR_NULL. Then missing
components are tested for a default initializer.

gcc/testsuite/
PR fortran/97612
* gfortran.dg/structure_constructor_17.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: application/x-patch
Size: 2134 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201228/50b5a538/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: structure_constructor_17.f90
Type: application/octet-stream
Size: 378 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201228/50b5a538/attachment.obj>


More information about the Gcc-patches mailing list