This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: g++ optimization issue??
- From: ColinLaney <claney at online dot de>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 17 Dec 2004 13:36:19 +0100
- Subject: RE: g++ optimization issue??
- References: <NUTMEGtdqVvPdLFYxc900000852@NUTMEG.CAM.ARTIMI.COM>
I am aware of fp issues. I just don't understand why the compiler
generates code that is not.
On Fri, 2004-12-17 at 12:27 +0000, Dave Korn wrote:
> > -----Original Message-----
> > From: gcc-owner On Behalf Of ColinLaney
> > Sent: 17 December 2004 12:13
>
> > I'm sorry if this has come up before and/or is well known or
> > obvious. If so I would appreciated to be pointed in the right
> > direction.
> >
> > When compiled with "-O6"
>
> You do understand that there aren't any optimisation levels > 3, don't you?
>
> > the program below produces the following output:
> > 203744051 0.440158
> > 203744051 0.633306
> > 203744051 0.633306
> > 203744051 0.440158
> >
> >
> > I've added some comments on what I think went wrong.
>
> Have you read 'What every computer scientist should know about floating
> point'?
>
> http://tinyurl.com/4sw7n
>
>
> cheers,
> DaveK