------- Comment #6 from jv244 at cam dot ac dot uk 2008-02-11 11:25 ------- (In reply to comment #5) > Or are you complaining that we constant fold integer powers as if they were > non-integer powers
Richard, I think I'm suggesting more a enhancement than a bug fix. Some good quality compiler like IBM's xlf90 guarantee bit-wise identical results at all optimisation levels, unless one specifies -qno-strict (which is included by default). My idea was/is that optimization independent results are (on the right hardware, i.e. not x87) also provided by gcc, unless one specifies -ffast-math. The above testcase is the only one I found in our 500kLOC simulation package that changed results as I changed optimisation levels, so I think it is valuable to make the underlying optimisation depending on a compile time flag (which is included in -ffast-math). >From a Fortran language point of view the compiler is free to use any implementation to compute a**i, including one that varies with optimisation level or context. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33780