From 6f3a2e239041e4daa5279631b70932c6d5e72ed6 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Wed, 27 Jun 2012 16:03:08 +0200 Subject: re PR preprocessor/37215 (ICE on 'gcc -E -dM -fpreprocessed - < /dev/null') PR preprocessor/37215 * c-ppoutput.c (preprocess_file): Check for nonempty buffer. From-SVN: r189016 --- gcc/c-family/c-ppoutput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-family/c-ppoutput.c') diff --git a/gcc/c-family/c-ppoutput.c b/gcc/c-family/c-ppoutput.c index df46ce4..862d15d 100644 --- a/gcc/c-family/c-ppoutput.c +++ b/gcc/c-family/c-ppoutput.c @@ -86,7 +86,7 @@ preprocess_file (cpp_reader *pfile) { /* A successful cpp_read_main_file guarantees that we can call cpp_scan_nooutput or cpp_get_token next. */ - if (flag_no_output) + if (flag_no_output && pfile->buffer) { /* Scan -included buffers, then the main file. */ while (pfile->buffer->prev) -- cgit v1.1