PR fortran/98017 - Suspected regression using PACK
authorHarald Anlauf <anlauf@gmx.de>
Sun, 29 Nov 2020 22:23:16 +0000 (23:23 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 29 Nov 2020 22:24:45 +0000 (23:24 +0100)
commitbb67ad5cff58a707aaae645d4f45a913d8511c86
tree67613d953caf08a30597942a357984b6f9a22bfc
parentccea13715b2ae55d4a784c2031553461ebf13eba
PR fortran/98017 - Suspected regression using PACK

When substituting a parameter variable of type character, the character
length was reset to 1.  Fix this by copying the length.

gcc/fortran/ChangeLog:

* expr.c (simplify_parameter_variable): Fix up character length
after copying an array-valued expression.

gcc/testsuite/ChangeLog:

* gfortran.dg/pr98017.f90: New test.
gcc/fortran/expr.c
gcc/testsuite/gfortran.dg/pr98017.f90 [new file with mode: 0644]