This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] Fix zero-length substrings


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]