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]

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


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".

	-Paul <kimoto@lightlink.com>

/* begin C code */

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;
}

/* end C code */

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