From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2286 invoked by alias); 19 Feb 2004 00:06:11 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2279 invoked by uid 48); 19 Feb 2004 00:06:10 -0000 Date: Thu, 19 Feb 2004 00:06:00 -0000 From: "1319 at bot dot ru" To: gcc-bugs@gcc.gnu.org Message-ID: <20040219000603.14205.1319@bot.ru> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/14205] New: ICE with -M and -include X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg01858.txt.bz2 List-Id: When gcc invoked with -M and -include it segfaults on any input files. This problem happens with c++ also. Easiest way to turn this bug on is: $ touch file.c file.h $ gcc -M -include file.h file.c file.c:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. $ or, easier to debug: $ cc1 -E -M -include file.h file.c with same result. It is at line 70 in c-ppoutput.c: (gcc 3.4.0 20040218) 61:/* Preprocess and output. */ 62:void 63:preprocess_file (cpp_reader *pfile) 64:{ 65: /* A successful cpp_read_main_file guarantees that we can call 66: cpp_scan_nooutput or cpp_get_token next. */ 67: if (flag_no_output) 68: { 69: /* Scan -included buffers, then the main file. */ 70: while (pfile->buffer->prev) 80: cpp_scan_nooutput (pfile); 90: cpp_scan_nooutput (pfile); 91: } here pfile->buffer == 0. -- Summary: ICE with -M and -include Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: critical Priority: P1 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: 1319 at bot dot ru CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14205