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]

Re: "const double" variable in 20000214 snapshot (Linux/Intel) with -O1


On Tue, Feb 15, 2000 at 02:02:39PM -0500, I wrote:
> I am trying the 20000214 snapshot on Linux/Intel (Debian potato, i586).
> The appended code doesn't pass the right value of x to p() when I compile
> with "-O1".  It does the right thing if the variable x is not "const".

I still see this problem in the 20000221 snapshot (even with 
"-O1 -fno-defer-pop -fno-thread-jumps").

> int true (void);  /* always returns 1 */
> void p (double);
> 
> void
> f (double a, double b)
> {
>   const double x = -(0.25*b + 0.5*a);
> 
>   if (true())
>      p(x);
> 
>   return;
> }

	-Paul <kimoto@lightlink.com>

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