Index: gcc/testsuite/gcc.dg/pr58893-0.h
===================================================================
--- gcc/testsuite/gcc.dg/pr58893-0.h	(Revision 0)
+++ gcc/testsuite/gcc.dg/pr58893-0.h	(Arbeitskopie)
@@ -0,0 +1 @@
+#pragma GCC visibility push(hidden)
Index: gcc/testsuite/gcc.dg/pr58893.c
===================================================================
--- gcc/testsuite/gcc.dg/pr58893.c	(Revision 0)
+++ gcc/testsuite/gcc.dg/pr58893.c	(Arbeitskopie)
@@ -0,0 +1,5 @@
+/* PR preprocessor/58893 */
+/* { dg-do compile } */
+/* { dg-options "-include pr58893-0.h -include pr58893-1.h -I${srcdir}/gcc.dg" } */
+/* { dg-error "pr58893-1.h: No such file or directory" "" { target *-*-* } 0 } */
+/* { dg-prune-output "compilation terminated" } */
Index: libcpp/errors.c
===================================================================
--- libcpp/errors.c	(Revision 215644)
+++ libcpp/errors.c	(Arbeitskopie)
@@ -48,10 +48,7 @@ cpp_diagnostic (cpp_reader * pfile, int level, int
      current run -- that is invalid.  */
   else if (pfile->cur_token == pfile->cur_run->base)
     {
-      if (pfile->cur_run->prev != NULL)
-	src_loc = pfile->cur_run->prev->limit->src_loc;
-      else
-	src_loc = 0;
+      src_loc = 0;
     }
   else
     {
Index: libcpp/files.c
===================================================================
--- libcpp/files.c	(Revision 215644)
+++ libcpp/files.c	(Arbeitskopie)
@@ -991,6 +991,18 @@ _cpp_stack_include (cpp_reader *pfile, const char
   _cpp_file *file;
   bool stacked;
 
+  /* For -include command-line flags we have type == IT_CMDLINE.
+     When the first -include file is processed we have the case, where
+     pfile->cur_token == pfile->cur_run->base, we are directly called up
+     by the front end.  However in the case of the second -include file,
+     we are called from _cpp_lex_token -> _cpp_get_fresh_line ->
+     cpp_push_include, with pfile->cur_token != pfile->cur_run->base,
+     and pfile->cur_token[-1].src_loc not (yet) initialized.
+     However, when the include file cannot be found, we need src_loc to
+     be initialized to some safe value: 0 means UNKNOWN_LOCATION.  */
+  if (type == IT_CMDLINE && pfile->cur_token != pfile->cur_run->base)
+    pfile->cur_token[-1].src_loc = 0;
+
   dir = search_path_head (pfile, fname, angle_brackets, type);
   if (!dir)
     return false;
