2006-06-08 Francois-Xavier Coudert 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. 2006-06-08 Francois-Xavier Coudert PR fortran/27958 * gcc/testsuite/gfortran.dg/substr_2.f: New test.