From: Ben Elliston Date: Thu, 14 Oct 2004 07:15:37 +0000 (+0000) Subject: re PR other/17900 (GCC's source path in ICE is wrong) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef9af07733703a8309a44b80b1b2d0e35bdd0d87;p=gcc.git re PR other/17900 (GCC's source path in ICE is wrong) PR other/17900 * diagnostic.c (trim_filename): Fix logic bug in walking backwards up the filename looking for a previous directory separator. From-SVN: r89029 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 465b25d3e29..9eb34ecb7f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-10-14 Ben Elliston + + PR other/17900 + * diagnostic.c (trim_filename): Fix logic bug in walking backwards + up the filename looking for a previous directory separator. + 2004-10-14 Joseph S. Myers * c-tree.h (enum c_typespec_kind, struct c_typespec, diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 0705c638600..c25c0ec5472 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -366,7 +366,7 @@ trim_filename (const char *name) p++, q++; /* Now go backwards until the previous directory separator. */ - while (p > name && IS_DIR_SEPARATOR (p[-1])) + while (p > name && !IS_DIR_SEPARATOR (p[-1])) p--; return p;