From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17899 invoked by alias); 10 Dec 2002 12:16:18 -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 17780 invoked by uid 71); 10 Dec 2002 12:16:16 -0000 Date: Tue, 10 Dec 2002 04:16:00 -0000 Message-ID: <20021210121616.17755.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Christian Ehrhardt" Subject: Re: other/3782: -fstats produces a segmentation fault Reply-To: "Christian Ehrhardt" X-SW-Source: 2002-12/txt/msg00541.txt.bz2 List-Id: The following reply was made to PR other/3782; it has been noted by GNATS. From: "Christian Ehrhardt" To: Sylvain Pion Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: other/3782: -fstats produces a segmentation fault Date: Tue, 10 Dec 2002 13:15:39 +0100 On Tue, Dec 10, 2002 at 12:16:31PM +0100, Sylvain Pion wrote: > > Does this still happen with your setup? > > Yes it does. With current mainline, I get : Thanks for the feedback. I only tried with gcc not with g++. I now can reproduce this, cc1plus segfaults even without ANY input file if -quiet and -fstats is passed. This one line patch (compiled but not bootstrap tested) fixes the ICE for me, not sure if this is the appropriate fix though. Someone please look at this and check it in if appropriate. --- gcc/timevar.c.orig Tue Dec 10 13:01:22 2002 +++ gcc/timevar.c Tue Dec 10 13:05:28 2002 @@ -404,7 +404,7 @@ timevar_accumulate (elapsed, &tv->start_time, &now); } /* Or is TIMEVAR at the top of the timer stack? */ - else if (stack->timevar == tv) + else if (stack && stack->timevar == tv) { get_time (&now); timevar_accumulate (elapsed, &start_time, &now); regards Christian -- THAT'S ALL FOLKS!