Commit cd7cdf4
committed
test: Avoid -ffinite-math-only on floating point comparisons
With `-ffinite-math-only` (implied by `-ffast-math` and -Ofast),
GCC considers all comparisons against infinities to be false
and can optimize them away. This breaks several tests that rely
on infinities to be compared correctly. To avoid this, we add
GCC-specific optimize attribute that disables `-ffinite-math-only`
optimization for floating point comarisions used in assertions.
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>1 parent 3113494 commit cd7cdf4
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| |||
0 commit comments