From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24471 invoked by alias); 15 Apr 2002 18:16:12 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24437 invoked by uid 71); 15 Apr 2002 18:16:09 -0000 Date: Mon, 15 Apr 2002 11:16:00 -0000 Message-ID: <20020415181608.24435.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: 'Neil Booth' Subject: Re: preprocessor/6084: cpp Segmentation Fault Reply-To: 'Neil Booth' X-SW-Source: 2002-04/txt/msg00784.txt.bz2 List-Id: The following reply was made to PR preprocessor/6084; it has been noted by GNATS. From: 'Neil Booth' To: "Gerwin, Joshua A" Cc: 'Phil Edwards' , joshg@hf.intel.com, gcc-gnats@gcc.gnu.org, rnesius@ichips.intel.com, "Nguyen, Tuan" , gcc-bugs@gcc.gnu.org Subject: Re: preprocessor/6084: cpp Segmentation Fault Date: Mon, 15 Apr 2002 19:15:40 +0100 Gerwin, Joshua A wrote:- > OK, here's my theory as to why I think you aren't seeing it in > maybe_print_line. Often when we compile, we use an optimizing flag (admit > it, you do this sometimes too!) and in this case the optimizer dropped the > jump to the separate print_line function and put the fprintf directly in > maybe_print_line. So in cppmain.c (line 329 by my reckoning), effectively > substitute > > else > { > print.lineno = line; > print_line (""); > } > > with > > else > { > print.lineno = line; > if (print.printed) putc ('\n', print.outf); > print.printed = 0; > fprintf (print.outf, "# %u \"%s\"%s%s\n", > print.lineno, print.last_fname, "", print.syshdr_flags); > } > > This saves a subroutine call. OK. Why can't you give me more info? Like the variables in question; clearly one is NULL? Maybe investigate why it is NULL in this case and not when you switch command line args? It would save us both a lot of time. Neil.