diff --git a/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c b/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c
new file mode 100644
index 00000000000..d77cc5fe228
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/missing-header-trad-1.c
@@ -0,0 +1,10 @@
+/* { dg-do preprocess } */
+/* { dg-options "-traditional-cpp" } */
+
+/* PR preprocessor/100904 */
+/* Make sure we error out on the correct line
+   for traditional cpp. */
+
+#include "nonexistent.h" /* { dg-error "-: nonexistent.h"  } */
+
+/* { dg-message "terminated" "terminated" { target *-*-* } 0 } */
diff --git a/libcpp/directives.cc b/libcpp/directives.cc
index 9c0f77ab017..d4a5ab1cbec 100644
--- a/libcpp/directives.cc
+++ b/libcpp/directives.cc
@@ -841,7 +841,14 @@ parse_include (cpp_reader *pfile, int *pangle_brackets,
 
   /* Allow macro expansion.  */
   header = get_token_no_padding (pfile);
-  *location = header->src_loc;
+
+  /* The location for traditional is the directive line as the
+     token line information for the temporary buffer.  */
+  if (CPP_OPTION (pfile, traditional))
+    *location = pfile->directive_line;
+  else
+    *location = header->src_loc;
+
   if ((header->type == CPP_STRING && header->val.str.text[0] != 'R')
       || header->type == CPP_HEADER_NAME)
     {
