Fortran: character length of pointer assignments in structure constructors
authorHarald Anlauf <anlauf@gmx.de>
Sun, 27 Mar 2022 19:35:15 +0000 (21:35 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Tue, 29 Mar 2022 18:30:56 +0000 (20:30 +0200)
commit0712f356374c2cf26015cccfa3141537e42cbb12
tree4ec7eedb4089f2bae57143ee671c3f40a46149dd
parentd886a5248e66ab911391af18bf955beb87ee8461
Fortran: character length of pointer assignments in structure constructors

gcc/fortran/ChangeLog:

PR fortran/50549
* resolve.cc (resolve_structure_cons): Reject pointer assignments
of character with different lengths in structure constructor.

gcc/testsuite/ChangeLog:

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