This is the mail archive of the gcc-prs@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]

Re: optimization/2938: [Regression vs 2.95] Optimization with -O1causes near infinite time


The following reply was made to PR optimization/2938; it has been noted by GNATS.

From: Wolfgang Bangerth <wolfgang.bangerth@iwr.uni-heidelberg.de>
To: Mark Mitchell <mark@codesourcery.com>
Cc: "gcc-bugs@gcc.gnu.org" <gcc-bugs@gcc.gnu.org>, gcc-gnats@gcc.gnu.org
Subject: Re: optimization/2938: [Regression vs 2.95] Optimization with -O1
 causes near infinite time
Date: Tue, 26 Jun 2001 08:42:01 +0200 (MET DST)

 > >> State-Changed-From-To: analyzed->closed
 > >>     Fixed.
 > >
 > > Dear Mark,
 > > thanks for looking into it.
 > 
 > I will investigate.
 
 You may want to use the appended tiny program for the regression test
 suite or for debugging. If it helps, I can as well file another bug report
 with a more suitable name (please propose one) so that c++/615 and
 optimization/2938 can be closed.
 
 Regards
   Wolfgang
 
 
 -----------------------------------------
 // compile with -O1
 #include <assert.h>
 
 // assert that foo() is only called once
 int count = 0;
 
 double foo () {
   count++;
   return 0;
 };
 
 double bar () {
   const double x[1] = { foo() };
   return x[0];
 };
 
 int main () 
 {
   bar();
   assert (count == 1);
 };
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                              www: http://gaia.iwr.uni-heidelberg.de/~wolf
 
 


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