This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/37215] ICE on 'gcc -E -dM -fpreprocessed - < /dev/null'


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]