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]

Re: looping problem with 19991221 snapshot on Linux/Intel


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>

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