[gfortran,patch] Fix zero-length substrings
tobias.schlueter@physik.uni-muenchen.de
tobias.schlueter@physik.uni-muenchen.de
Thu Jun 8 21:22:00 GMT 2006
FX Coudert <fxcoudert@gmail.com> wrote on Thu, 08 Jun 2006:
> The patch sets substring length to zero if it is computed (from the
> start and end bounds) to be negative, fixing all these problems. I
> also added a check to avoid calls to _gfortran_copy_string when the
> destination length is zero, for example: d(5:4) = "foobar".
Using MAX_EXPR would be even simpler.
> Regtested on i686-linux, it comes with a testcase that failed in
> various places before the patch. OK for mainline and 4.1?
Ok, with the change to MAX_EXPR if you like.
- Tobi
:REVIEWMAIL:
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Gcc-patches
mailing list