2015-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
commit34bf7ba5777c0f0f2b09473ec4db609bf772daa9
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Oct 2015 16:50:47 +0000 (17 16:50 +0000)
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Oct 2015 16:50:47 +0000 (17 16:50 +0000)
tree538dc3982c7de62c55c6e43407ca68fd6c995ae1
parent06743455d096dd5b538ca0ce0db2eaeafd103345
2015-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67987
* decl.c (char_len_param_value): Unwrap unlong line.  If LEN < 0,
force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
* resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
If 'start' is larger than 'end', length of substring is negative,
so explicitly set it to zero.
(resolve_charlen): Remove -Wsurprising warning.  Update comment to
reflect that the text is from the F2008 standard.

2015-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67987
* gfortran.df/pr67987.f90: New test.
* gfortran.dg/char_length_2.f90: Update testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228933 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/char_length_2.f90
gcc/testsuite/gfortran.dg/pr67987.f90 [new file with mode: 0644]