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]

Re: other/3782: -fstats produces a segmentation fault


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!


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