This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: other/3782: -fstats produces a segmentation fault
- From: "Christian Ehrhardt" <ehrhardt at mathematik dot uni-ulm dot de>
- To: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Dec 2002 13:15:39 +0100
- Subject: Re: other/3782: -fstats produces a segmentation fault
- References: <20021209192025.13667.qmail@sources.redhat.com> <20021210121631.B20116@papillon.inria.fr>
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!