Fortran: skip compile-time shape check if constructor shape is not known
authorHarald Anlauf <anlauf@gmx.de>
Mon, 21 Feb 2022 21:49:05 +0000 (22:49 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 22 Feb 2022 20:34:58 +0000 (21:34 +0100)
commitbc66b471d16ef2fd8cb66fd1131b41f80ecb9961
treeeda63dd91babb51df82666b785f93122f103854d
parent9d1796d82d46dd3086f07953129dc5761feb707b
Fortran: skip compile-time shape check if constructor shape is not known

gcc/fortran/ChangeLog:

PR fortran/104619
* resolve.cc (resolve_structure_cons): Skip shape check if shape
of constructor cannot be determined at compile time.

gcc/testsuite/ChangeLog:

PR fortran/104619
* gfortran.dg/derived_constructor_comps_7.f90: New test.
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/derived_constructor_comps_7.f90 [new file with mode: 0644]