This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/37215] ICE on 'gcc -E -dM -fpreprocessed - < /dev/null'
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Jan 2012 23:00:54 +0000
- Subject: [Bug preprocessor/37215] ICE on 'gcc -E -dM -fpreprocessed - < /dev/null'
- Auto-submitted: auto-generated
- References: <bug-37215-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37215
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #12 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-01-13 23:00:54 UTC ---
On inspecting this more closely, I agree with patriciak784. The issue isn't
directly related to the fix of Richard for PR20239.
So I suggest patch for c-family/c-ppoutput.c as following:
Index: c-family/c-ppoutput.c
===================================================================
--- c-family/c-ppoutput.c (revision 183106)
+++ c-family/c-ppoutput.c (working copy)
@@ -86,7 +86,7 @@
{
/* 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)