"const double" variable in 20000214 snapshot (Linux/Intel) with -O1
Paul Kimoto
kimoto@lightlink.com
Tue Feb 15 11:03:00 GMT 2000
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 */
More information about the Gcc-bugs
mailing list