------- Comment #3 from burnus at gcc dot gnu dot org 2008-06-22 17:54 ------- Fortran requires that parenthesis are always honoured. All other associative maths operations are allowed in Fortran, but as IEEE is also allowed, this gives problems e.g. INF is involved or signed zeros. Therefore, gfortran does no associative operations by default, only if -ffinite-math-only is enabled. But in this case, there the parenthesis are still always honoured.
At least this is my knowledge about the optimizations done at the moment. Though, at the moment it is unclear to me, why -O3 is slower than -O2. See also PR 35259. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36599