Fortran: Correct missing structure constructor comps. [PR97612].
authorPaul Thomas <pault@gcc.gnu.org>
Tue, 29 Dec 2020 17:44:48 +0000 (17:44 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Tue, 29 Dec 2020 17:44:48 +0000 (17:44 +0000)
commiteeb145317b42d5203056851435457d9189a7303d
treecb2e5812591f450f58c157376d43638c34c5f325
parentfeae0af82753e06fbff6103da5fbb3b28e1ddbd7
Fortran: Correct missing structure constructor comps. [PR97612].

2020-12-29  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.
gcc/fortran/primary.c
gcc/testsuite/gfortran.dg/structure_constructor_17.f90 [new file with mode: 0644]