PR fortran/27958
* trans-expr.c (gfc_conv_substring): If the substring start is
greater than its end, the length of the substring is zero, and
not negative.
(gfc_trans_string_copy): Don't generate a call to
_gfortran_copy_string when destination length is zero.
* gcc/testsuite/gfortran.dg/substr_2.f: New test.
From-SVN: r114496
This directory contains the GNU Compiler Collection (GCC).
The GNU Compiler Collection is free software. See the file COPYING
for copying permission. The manuals, and some of the runtime
libraries, are under different terms; see the individual source files
for details.
The directory INSTALL contains copies of the installation information
as HTML and plain text. The source of this information is
gcc/doc/install.texi. The installation information includes details
of what is included in the GCC sources and what files GCC installs.
See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information. An online readable
version of the manual is in the files gcc/doc/gcc.info*.
See http://gcc.gnu.org/bugs.html for how to report bugs usefully.