This is a proposal to introduce an optimization level -Ofast that can collect (target specific) optimization flags that can affect runtime behavior such as -funsafe-math-optimizations or -mrecip.
Currently none of the standard optimization levels have this kind of affect and we should not change that (people might argue that -funsafe-math-optimizations can go into -O3). For floating-point intensive programs people often disregard the various special (and target dependent) flags and/or do not know about -ffast-math. -Ofast on the other hand is recognized by many compilers and is widely known to affect program behavior in corner cases. I would initially propose to make -Ofast be -O3 -ffast-math and would strongly encourage target maintainers that consider adding to -Ofast make sure that popular benchmarks for their target still behave correctly when using -Ofast. Any comments or objections? After the discussion has died down I will propose a patch to gcc-patches. Thanks, Richard.