2004-08-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/17164
* runtime/string_intrinsics.c (string_index):check for
substring longer than string.
* gfortran.dg/pr17164.f90: New test.
From-SVN: r86527
+2004-08-24 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/17164
+ * gfortran.dg/pr17164.f90: New test.
+
2004-08-24 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* gcc.dg/tree-ssa/loop-1.c: New test.
--- /dev/null
+! pr17164
+! index aborts when substring is longer than string
+ implicit none
+ character*5 x
+ integer i
+ x='12345'
+ i=index(x,'blablabl')
+ if (i.ne.0) call abort
+ end
+
+2004-08-24 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/17164
+ * runtime/string_intrinsics.c (string_index):check for
+ substring longer than string.
+
2004-08-24 David Edelsohn <edelsohn@gnu.org>
* Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
if (sslen == 0)
return 1;
+ if (sslen > slen)
+ return 0;
+
if (!back)
{
last = slen + 1 - sslen;