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