This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: looping problem with 19991221 snapshot on Linux/Intel
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: looping problem with 19991221 snapshot on Linux/Intel
- From: Paul Kimoto <kimoto at lightlink dot com>
- Date: Wed, 5 Jan 2000 10:22:28 -0500
- References: <19991222185441.A30064@lightlink.com>
On Wed, Dec 22, 1999 at 06:54:41PM -0500, Paul Kimoto wrote:
> I am trying the 19991221 snapshot on Linux/i586,
> with glibc-2.1.2 (as provided by Debian).
This problem is still present in the 20000103 snapshot.
(Can anyone confirm, at least?)
> With -O0, count() returns 17 (this is okay);
> but with -O1, count() returns 7 (this is not).
>
> /* begin C code */
>
> static double g (double);
>
> int
> count (void)
> {
> double x;
> int count = 0;
>
> for (x = 0.0; x <= 1.0; x += 0.0625) {
> g(g(x));
> count++;
> }
>
> return count;
> }
>
> static double
> g (double x)
> {
> return x;
> }
>
> /* end C code */
-Paul <kimoto@lightlink.com>