diff --git a/gcc/toplev.c b/gcc/toplev.c index c3269f4edd0..f24767a845a 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2389,8 +2389,12 @@ output_file_directive (asm_file, input_name) /* NA gets INPUT_NAME sans directory names. */ while (na > input_name) { + if (na[-1] == '/') + break; +#ifdef DIR_SEPARATOR if (na[-1] == DIR_SEPARATOR) break; +#endif na--; }