This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
"const double" variable in 20000214 snapshot (Linux/Intel) with -O1
- To: gcc-bugs at gcc dot gnu dot org
- Subject: "const double" variable in 20000214 snapshot (Linux/Intel) with -O1
- From: Paul Kimoto <kimoto at lightlink dot com>
- Date: Tue, 15 Feb 2000 14:02:39 -0500
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 */