------- Comment #1 from fxcoudert at gcc dot gnu dot org 2006-06-08 21:48 ------- Subject: Bug 27958
Author: fxcoudert Date: Thu Jun 8 21:48:05 2006 New Revision: 114496 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114496 Log: 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. Added: trunk/gcc/testsuite/gfortran.dg/substr_2.f Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27958