1 // Test that the GCC fast-math floating point flags get lowered to the correct
2 // permutation of Clang frontend flags. This is non-trivial for a few reasons.
3 // First, the GCC flags have many different and surprising effects. Second,
4 // LLVM only supports three switches which is more coarse grained than GCC's
5 // support.
6 //
7 // Both of them use gcc driver for as.
8 //
9 // RUN: %clang -### -fno-honor-infinities -c %s 2>&1 \
10 // RUN:   | FileCheck --check-prefix=CHECK-NO-INFS %s
11 // infinites [sic] is a supported alternative spelling of infinities.
12 // RUN: %clang -### -fno-honor-infinites -c %s 2>&1 \
13 // RUN:   | FileCheck --check-prefix=CHECK-NO-INFS %s
14 // CHECK-NO-INFS: "-cc1"
15 // CHECK-NO-INFS: "-menable-no-infs"
16 //
17 // RUN: %clang -### -fno-fast-math -fno-honor-infinities -c %s 2>&1 \
18 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-INFS %s
19 // CHECK-NO-FAST-MATH-NO-INFS: "-cc1"
20 // CHECK-NO-FAST-MATH-NO-INFS: "-menable-no-infs"
21 //
22 // RUN: %clang -### -fno-honor-infinities -fno-fast-math -c %s 2>&1 \
23 // RUN:   | FileCheck --check-prefix=CHECK-NO-INFS-NO-FAST-MATH %s
24 // CHECK-NO-INFS-NO-FAST-MATH: "-cc1"
25 // CHECK-NO-INFS-NO-FAST-MATH-NOT: "-menable-no-infs"
26 //
27 // RUN: %clang -### -fno-signed-zeros -c %s 2>&1 \
28 // RUN:   | FileCheck --check-prefix=CHECK-NO-SIGNED-ZEROS %s
29 // CHECK-NO-SIGNED-ZEROS: "-cc1"
30 // CHECK-NO-SIGNED-ZEROS: "-fno-signed-zeros"
31 //
32 // RUN: %clang -### -fno-fast-math -fno-signed-zeros -c %s 2>&1 \
33 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS %s
34 // CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS: "-cc1"
35 // CHECK-NO-FAST-MATH-NO-SIGNED-ZEROS: "-fno-signed-zeros"
36 //
37 // RUN: %clang -### -fno-signed-zeros -fno-fast-math -c %s 2>&1 \
38 // RUN:   | FileCheck --check-prefix=CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH %s
39 // CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH: "-cc1"
40 // CHECK-NO-SIGNED-ZEROS-NO-FAST-MATH-NOT: "-fno-signed-zeros"
41 //
42 // RUN: %clang -### -freciprocal-math -c %s 2>&1 \
43 // RUN:   | FileCheck --check-prefix=CHECK-RECIPROCAL-MATH %s
44 // CHECK-RECIPROCAL-MATH: "-cc1"
45 // CHECK-RECIPROCAL-MATH: "-freciprocal-math"
46 //
47 // RUN: %clang -### -fno-fast-math -freciprocal-math -c %s 2>&1 \
48 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH-RECIPROCAL-MATH %s
49 // CHECK-NO-FAST-MATH-RECIPROCAL-MATH: "-cc1"
50 // CHECK-NO-FAST-MATH-RECIPROCAL-MATH: "-freciprocal-math"
51 //
52 // RUN: %clang -### -freciprocal-math -fno-fast-math -c %s 2>&1 \
53 // RUN:   | FileCheck --check-prefix=CHECK-RECIPROCAL-MATH-NO-FAST-MATH %s
54 // CHECK-RECIPROCAL-MATH-NO-FAST-MATH: "-cc1"
55 // CHECK-RECIPROCAL-MATH-NO-FAST-MATH-NOT: "-freciprocal-math"
56 //
57 // RUN: %clang -### -fno-honor-nans -c %s 2>&1 \
58 // RUN:   | FileCheck --check-prefix=CHECK-NO-NANS %s
59 // CHECK-NO-NANS: "-cc1"
60 // CHECK-NO-NANS: "-menable-no-nans"
61 //
62 // RUN: %clang -### -fno-fast-math -fno-honor-nans -c %s 2>&1 \
63 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-NANS %s
64 // CHECK-NO-FAST-MATH-NO-NANS: "-cc1"
65 // CHECK-NO-FAST-MATH-NO-NANS: "-menable-no-nans"
66 //
67 // RUN: %clang -### -fno-honor-nans -fno-fast-math -c %s 2>&1 \
68 // RUN:   | FileCheck --check-prefix=CHECK-NO-NANS-NO-FAST-MATH %s
69 // CHECK-NO-NANS-NO-FAST-MATH: "-cc1"
70 // CHECK-NO-NANS-NO-FAST-MATH-NOT: "-menable-no-nans"
71 //
72 // RUN: %clang -### -ffast-math -fno-approx-func -c %s 2>&1 \
73 // RUN:   | FileCheck --check-prefix=CHECK-FAST-MATH-NO-APPROX-FUNC %s
74 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-cc1"
75 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-menable-no-infs"
76 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-menable-no-nans"
77 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-fno-signed-zeros"
78 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-mreassociate"
79 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-freciprocal-math"
80 // CHECK-FAST-MATH-NO-APPROX-FUNC:     "-ffp-contract=fast"
81 // CHECK-FAST-MATH-NO-APPROX-FUNC-NOT: "-ffast-math"
82 // CHECK-FAST-MATH-NO-APPROX-FUNC-NOT: "-fapprox-func"
83 //
84 // RUN: %clang -### -fno-approx-func -ffast-math -c %s 2>&1 \
85 // RUN:   | FileCheck --check-prefix=CHECK-NO-APPROX-FUNC-FAST-MATH %s
86 // CHECK-NO-APPROX-FUNC-FAST-MATH: "-cc1"
87 // CHECK-NO-APPROX-FUNC-FAST-MATH: "-ffast-math"
88 //
89 // RUN: %clang -### -fapprox-func -c %s 2>&1 \
90 // RUN:   | FileCheck --check-prefix=CHECK-APPROX-FUNC %s
91 // CHECK-APPROX-FUNC: "-cc1"
92 // CHECK-APPROX-FUNC: "-fapprox-func"
93 //
94 // RUN: %clang -### -fmath-errno -c %s 2>&1 \
95 // RUN:   | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
96 // CHECK-MATH-ERRNO: "-cc1"
97 // CHECK-MATH-ERRNO: "-fmath-errno"
98 //
99 // RUN: %clang -### -fmath-errno -fno-math-errno -c %s 2>&1 \
100 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
101 // CHECK-NO-MATH-ERRNO: "-cc1"
102 // CHECK-NO-MATH-ERRNO-NOT: "-fmath-errno"
103 //
104 // Target defaults for -fmath-errno (reusing the above checks).
105 // RUN: %clang -### -target i686-unknown-linux -c %s 2>&1 \
106 // RUN:   | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
107 // RUN: %clang -### -target i686-apple-darwin -c %s 2>&1 \
108 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
109 // RUN: %clang -### -target x86_64-unknown-freebsd -c %s 2>&1 \
110 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
111 // RUN: %clang -### -target x86_64-unknown-netbsd -c %s 2>&1 \
112 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
113 // RUN: %clang -### -target x86_64-unknown-openbsd -c %s 2>&1 \
114 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
115 // RUN: %clang -### -target x86_64-unknown-dragonfly -c %s 2>&1 \
116 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
117 // RUN: %clang -### -target x86_64-fuchsia -c %s 2>&1 \
118 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
119 // RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \
120 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
121 // RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \
122 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
123 // RUN: %clang -### -target amdgcn-amd-amdhsa -c %s 2>&1 \
124 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
125 // RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \
126 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
127 // RUN: %clang -### -target amdgcn-mesa-mesa3d -c %s 2>&1   \
128 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
129 //
130 // Check that -ffast-math disables -fmath-errno, and -fno-fast-math merely
131 // preserves the target default. Also check various flag set operations between
132 // the two flags. (Resuses above checks.)
133 // RUN: %clang -### -ffast-math -c %s 2>&1 \
134 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
135 // RUN: %clang -### -fmath-errno -ffast-math -c %s 2>&1 \
136 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
137 // RUN: %clang -### -ffast-math -fmath-errno -c %s 2>&1 \
138 // RUN:   | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
139 // RUN: %clang -### -target i686-unknown-linux -fno-fast-math -c %s 2>&1 \
140 // RUN:   | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
141 // RUN: %clang -### -target i686-unknown-linux -fno-math-errno -fno-fast-math -c %s 2>&1 \
142 // RUN:   | FileCheck --check-prefix=CHECK-MATH-ERRNO %s
143 // RUN: %clang -### -target i686-apple-darwin -fno-fast-math -c %s 2>&1 \
144 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
145 // RUN: %clang -### -target i686-apple-darwin -fno-math-errno -fno-fast-math -c %s 2>&1 \
146 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
147 // RUN: %clang -### -fno-fast-math -fno-math-errno -c %s 2>&1 \
148 // RUN:   | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
149 //
150 // RUN: %clang -### -fno-math-errno -fassociative-math -freciprocal-math \
151 // RUN:     -fno-signed-zeros -fno-trapping-math -fapprox-func -c %s 2>&1 \
152 // RUN:   | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
153 // CHECK-UNSAFE-MATH: "-cc1"
154 // CHECK-UNSAFE-MATH: "-menable-unsafe-fp-math"
155 // CHECK-UNSAFE-MATH: "-mreassociate"
156 //
157 // RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \
158 // RUN:     -fno-signed-zeros -fno-trapping-math -fapprox-func -c %s 2>&1 \
159 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH-UNSAFE-MATH %s
160 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-cc1"
161 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-menable-unsafe-fp-math"
162 // CHECK-NO-FAST-MATH-UNSAFE-MATH: "-mreassociate"
163 
164 // The 2nd -fno-fast-math overrides -fassociative-math.
165 
166 // RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \
167 // RUN:     -fno-fast-math -fno-signed-zeros -fno-trapping-math -c %s 2>&1 \
168 // RUN:   | FileCheck --check-prefix=CHECK-UNSAFE-MATH-NO-FAST-MATH %s
169 // CHECK-UNSAFE-MATH-NO-FAST-MATH: "-cc1"
170 // CHECK-UNSAFE-MATH-NO-FAST-MATH-NOT: "-menable-unsafe-fp-math"
171 // CHECK-UNSAFE-MATH-NO-FAST-MATH-NOT: "-mreassociate"
172 //
173 // Check that various umbrella flags also enable these frontend options.
174 // RUN: %clang -### -ffast-math -c %s 2>&1 \
175 // RUN:   | FileCheck --check-prefix=CHECK-NO-INFS %s
176 // RUN: %clang -### -ffast-math -c %s 2>&1 \
177 // RUN:   | FileCheck --check-prefix=CHECK-NO-NANS %s
178 // RUN: %clang -### -ffast-math -c %s 2>&1 \
179 // RUN:   | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
180 // RUN: %clang -### -ffinite-math-only -c %s 2>&1 \
181 // RUN:   | FileCheck --check-prefix=CHECK-NO-INFS %s
182 // RUN: %clang -### -ffinite-math-only -c %s 2>&1 \
183 // RUN:   | FileCheck --check-prefix=CHECK-NO-NANS %s
184 // RUN: %clang -### -funsafe-math-optimizations -fno-math-errno -c %s 2>&1 \
185 // RUN:   | FileCheck --check-prefix=CHECK-UNSAFE-MATH %s
186 //
187 // One umbrella flag is *really* weird and also changes the semantics of the
188 // program by adding a special preprocessor macro. Check that the frontend flag
189 // modeling this semantic change is provided. Also check that the flag is not
190 // present if any of the optimizations are disabled.
191 // RUN: %clang -### -ffast-math -c %s 2>&1 \
192 // RUN:   | FileCheck --check-prefix=CHECK-FAST-MATH %s
193 // RUN: %clang -### -fno-fast-math -ffast-math -c %s 2>&1 \
194 // RUN:   | FileCheck --check-prefix=CHECK-FAST-MATH %s
195 // RUN: %clang -### -funsafe-math-optimizations -ffinite-math-only \
196 // RUN:     -fno-math-errno -ffp-contract=fast -fno-rounding-math -c %s 2>&1 \
197 // RUN:   | FileCheck --check-prefix=CHECK-FAST-MATH %s
198 // RUN: %clang -### -fno-honor-infinities -fno-honor-nans -fno-math-errno \
199 // RUN:     -fassociative-math -freciprocal-math -fno-signed-zeros -fapprox-func \
200 // RUN:     -fno-trapping-math -ffp-contract=fast -fno-rounding-math -c %s 2>&1 \
201 // RUN:   | FileCheck --check-prefix=CHECK-FAST-MATH %s
202 // CHECK-FAST-MATH: "-cc1"
203 // CHECK-FAST-MATH: "-ffast-math"
204 // CHECK-FAST-MATH: "-ffinite-math-only"
205 //
206 // RUN: %clang -### -ffast-math -fno-fast-math -c %s 2>&1 \
207 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
208 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
209 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
210 // RUN: %clang -### -ffast-math -fno-unsafe-math-optimizations -c %s 2>&1 \
211 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
212 // RUN: %clang -### -ffast-math -fmath-errno -c %s 2>&1 \
213 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s
214 // RUN: %clang -### -ffast-math -fno-associative-math -c %s 2>&1 \
215 // RUN:   | FileCheck --check-prefix=CHECK-NO-FAST-MATH --check-prefix=CHECK-ASSOC-MATH %s
216 // CHECK-NO-FAST-MATH: "-cc1"
217 // CHECK-NO-FAST-MATH-NOT: "-ffast-math"
218 // CHECK-ASSOC-MATH-NOT: "-mreassociate"
219 //
220 // Check various means of disabling these flags, including disabling them after
221 // they've been enabled via an umbrella flag.
222 // RUN: %clang -### -fno-honor-infinities -fhonor-infinities -c %s 2>&1 \
223 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
224 // RUN: %clang -### -ffinite-math-only -fhonor-infinities -c %s 2>&1 \
225 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
226 // RUN: %clang -### -ffinite-math-only -fno-finite-math-only -c %s 2>&1 \
227 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
228 // RUN: %clang -### -ffast-math -fhonor-infinities -c %s 2>&1 \
229 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
230 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
231 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-INFS %s
232 // CHECK-NO-NO-INFS: "-cc1"
233 // CHECK-NO-NO-INFS-NOT: "-menable-no-infs"
234 // CHECK-NO-NO-INFS-NOT: "-ffinite-math-only"
235 // CHECK-NO-NO-INFS: "-o"
236 //
237 // RUN: %clang -### -fno-honor-nans -fhonor-nans -c %s 2>&1 \
238 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
239 // RUN: %clang -### -ffinite-math-only -fhonor-nans -c %s 2>&1 \
240 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
241 // RUN: %clang -### -ffinite-math-only -fno-finite-math-only -c %s 2>&1 \
242 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
243 // RUN: %clang -### -ffast-math -fhonor-nans -c %s 2>&1 \
244 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
245 // RUN: %clang -### -ffast-math -fno-finite-math-only -c %s 2>&1 \
246 // RUN:   | FileCheck --check-prefix=CHECK-NO-NO-NANS %s
247 // CHECK-NO-NO-NANS: "-cc1"
248 // CHECK-NO-NO-NANS-NOT: "-menable-no-nans"
249 // CHECK-NO-NO-NANS-NOT: "-ffinite-math-only"
250 // CHECK-NO-NO-NANS: "-o"
251 
252 // A later inverted option overrides an earlier option.
253 
254 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
255 // RUN:     -fno-trapping-math -fno-associative-math -c %s 2>&1 \
256 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
257 
258 // RUN: %clang -### -funsafe-math-optimizations -fno-associative-math -c %s \
259 // RUN:   2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
260 
261 // RUN: %clang -### -funsafe-math-optimizations -fno-reciprocal-math -c %s \
262 // RUN:   2>&1 | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
263 // RUN: %clang -### -funsafe-math-optimizations -fsigned-zeros -c %s 2>&1 \
264 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
265 // RUN: %clang -### -funsafe-math-optimizations -ftrapping-math -c %s 2>&1 \
266 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
267 // RUN: %clang -### -funsafe-math-optimizations -fno-unsafe-math-optimizations \
268 // RUN:     -c %s 2>&1 \
269 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
270 // RUN: %clang -### -ffast-math -fno-associative-math -c %s 2>&1 \
271 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
272 
273 // RUN: %clang -### -ffast-math -fno-reciprocal-math -c %s 2>&1 \
274 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
275 // RUN: %clang -### -ffast-math -fsigned-zeros -c %s 2>&1 \
276 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
277 // RUN: %clang -### -ffast-math -ftrapping-math -c %s 2>&1 \
278 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
279 // RUN: %clang -### -ffast-math -fno-unsafe-math-optimizations -c %s 2>&1 \
280 // RUN:   | FileCheck --check-prefix=CHECK-NO-UNSAFE-MATH %s
281 
282 // CHECK-NO-UNSAFE-MATH: "-cc1"
283 // CHECK-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
284 // CHECK-NO_UNSAFE-MATH-NOT: "-mreassociate"
285 // CHECK-NO-UNSAFE-MATH: "-o"
286 
287 
288 // Reassociate is allowed because it does not require reciprocal-math.
289 
290 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
291 // RUN:     -fno-trapping-math -fno-reciprocal-math -c %s 2>&1 \
292 // RUN:   | FileCheck --check-prefix=CHECK-REASSOC-NO-UNSAFE-MATH %s
293 
294 // CHECK-REASSOC-NO-UNSAFE-MATH: "-cc1"
295 // CHECK-REASSOC-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
296 // CHECK-REASSOC-NO_UNSAFE-MATH: "-mreassociate"
297 // CHECK-REASSOC-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
298 // CHECK-REASSOC-NO-UNSAFE-MATH: "-o"
299 
300 
301 // In these runs, reassociate is not allowed because both no-signed-zeros and no-trapping-math are required.
302 
303 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
304 // RUN:     -fno-trapping-math -fsigned-zeros -c %s 2>&1 \
305 // RUN:   | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s
306 
307 // RUN: %clang -### -fassociative-math -freciprocal-math -fno-signed-zeros \
308 // RUN:     -fno-trapping-math -ftrapping-math -c %s 2>&1 \
309 // RUN:   | FileCheck --check-prefix=CHECK-NO-REASSOC-NO-UNSAFE-MATH %s
310 
311 // CHECK-NO-REASSOC-NO-UNSAFE-MATH: "-cc1"
312 // CHECK-NO-REASSOC-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
313 // CHECK-NO-REASSOC-NO_UNSAFE-MATH-NOT: "-mreassociate"
314 // CHECK-NO-REASSOC-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
315 // CHECK-NO-REASSOC-NO-UNSAFE-MATH: "-o"
316 
317 
318 // This isn't fast-math, but the option is handled in the same place as other FP params.
319 // Last option wins, and strict behavior is assumed by default.
320 
321 // RUN: %clang -### -fno-strict-float-cast-overflow -c %s 2>&1 \
322 // RUN:   | FileCheck --check-prefix=CHECK-FPOV-WORKAROUND %s
323 // CHECK-FPOV-WORKAROUND: "-cc1"
324 // CHECK-FPOV-WORKAROUND: "-fno-strict-float-cast-overflow"
325 
326 // RUN: %clang -### -c %s 2>&1 \
327 // RUN:   | FileCheck --check-prefix=CHECK-FPOV-WORKAROUND-DEFAULT %s
328 // CHECK-FPOV-WORKAROUND-DEFAULT: "-cc1"
329 // CHECK-FPOV-WORKAROUND-DEFAULT-NOT: "strict-float-cast-overflow"
330 
331 // RUN: %clang -### -fstrict-float-cast-overflow -c %s 2>&1 \
332 // RUN:   | FileCheck --check-prefix=CHECK-NO-FPOV-WORKAROUND %s
333 // CHECK-NO-FPOV-WORKAROUND: "-cc1"
334 // CHECK-NO-FPOV-WORKAROUND-NOT: "strict-float-cast-overflow"
335 
336 // RUN: %clang -### -fno-strict-float-cast-overflow -fstrict-float-cast-overflow -c %s 2>&1 \
337 // RUN:   | FileCheck --check-prefix=CHECK-NO-FPOV-WORKAROUND-OVERRIDE %s
338 // CHECK-NO-FPOV-WORKAROUND-OVERRIDE: "-cc1"
339 // CHECK-NO-FPOV-WORKAROUND-OVERRIDE-NOT: "strict-float-cast-overflow"
340 
341