re PR fortran/85520 (Out of memory when declaring a character with len << 0)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Tue, 24 Apr 2018 23:17:29 +0000 (23:17 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Tue, 24 Apr 2018 23:17:29 +0000 (23:17 +0000)
commit58da192e7a35ed16e23d5a33246d68fae3d1a1dc
tree5fc084040ddbfbf1950f194b1e97005353888bae
parent08417efa3ad973ba7b1be5b6a530e0b186e3c294
re PR fortran/85520 (Out of memory when declaring a character with len << 0)

2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/85520
* decl.c (gfc_match_char_spec): Check for negative length and set to 0.

2018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/85520
* gfortran.dg/pr85520.f90: New test.

From-SVN: r259623
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr85520.f90 [new file with mode: 0644]