re PR other/17900 (GCC's source path in ICE is wrong)
authorBen Elliston <bje@au.ibm.com>
Thu, 14 Oct 2004 07:15:37 +0000 (07:15 +0000)
committerBen Elliston <bje@gcc.gnu.org>
Thu, 14 Oct 2004 07:15:37 +0000 (17:15 +1000)
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

gcc/ChangeLog
gcc/diagnostic.c

index 465b25d3e29ace259e82e6436e2a51d49db1afa1..9eb34ecb7f5ea6ae025b437cdcbbaf8256fbfbbc 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-14  Ben Elliston  <bje@au.ibm.com>
+
+       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  <jsm@polyomino.org.uk>
 
        * c-tree.h (enum c_typespec_kind, struct c_typespec,
index 0705c6386008ab37a958f4e914a247e2afed60d3..c25c0ec547279c38192b08d034845833d9024d66 100644 (file)
@@ -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;