Commit 70c5c86
committed
Do not use -Ofast
-Ofast implies -funsafe-math-optimizations, which affects the global FP state
for all programs: when used at link time, it may include libraries or startup
files that change the default FPU control word or other similar optimizations.
-Ofast enables (directly or indirectly):
- ❌ -fallow-store-data-races
- ✔ -fno-semantic-interposition
- ✔ -fno-math-errno
- ❌ -funsafe-math-optimizations
- ❌ -ffinite-math-only
- ✔ -fno-rounding-math (_default_)
- ✔ -fno-signaling-nans (_default_)
- ❔ -fcx-limited-range
- ✔ -fexcess-precision=fast
- ✔ -fno-signed-zeros
- ✔ -fno-trapping-math
- ✔ -fassociative-math
- ❌ -freciprocal-math (disabled in #8280)
We should not use -fallow-store-data-races, -ffinite-math-only.
We should not use -funsafe-math-optimizations at link time, as it affects the
global FP state. It's probably easier to replace it with the individual options
-fno-signed-zeros, -fno-trapping-math and -fassociative-math.
We may revisit -fcx-limited-range if we do use Complex arithmetics.
-freciprocal-math was already disabled explicitly, see #8280.1 parent cce7e6a commit 70c5c86
1 file changed
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments