Debian Codegraph @

clang/test/Driver/range.c

raw
1 // Test range options for complex multiplication and division.
2
3 // RUN: %clang -### -target x86_64 -fcx-limited-range -c %s 2>&1 \
4 // RUN: | FileCheck --check-prefix=BASIC %s
5
6 // RUN: %clang -### -target x86_64 -fno-cx-limited-range -c %s 2>&1 \
7 // RUN: | FileCheck --check-prefix=FULL %s
8
9 // RUN: %clang -### -target x86_64 -fcx-limited-range -fno-cx-limited-range \
10 // RUN: -c %s 2>&1 | FileCheck --check-prefix=FULL %s
11
12 // RUN: %clang -### -target x86_64 -fno-cx-limited-range -fcx-limited-range \
13 // RUN: -c %s 2>&1 | FileCheck --check-prefix=BASIC %s
14
15 // RUN: %clang -### -target x86_64 -fno-cx-limited-range -fno-cx-fortran-rules \
16 // RUN: -c %s 2>&1 | FileCheck --check-prefix=FULL %s
17
18 // RUN: %clang -### -target x86_64 -fno-cx-fortran-rules -fno-cx-limited-range \
19 // RUN: -c %s 2>&1 | FileCheck --check-prefix=FULL %s
20
21 // RUN: %clang -### -target x86_64 -fcx-fortran-rules -c %s 2>&1 \
22 // RUN: | FileCheck --check-prefix=IMPRVD %s
23
24 // RUN: %clang -### -target x86_64 -fno-cx-fortran-rules -c %s 2>&1 \
25 // RUN: | FileCheck --check-prefix=FULL %s
26
27 // RUN: %clang -### -target x86_64 -fcx-fortran-rules -c %s 2>&1 \
28 // RUN: -fno-cx-fortran-rules | FileCheck --check-prefix=FULL %s
29
30 // RUN: %clang -### -target x86_64 -fno-cx-fortran-rules -c %s 2>&1 \
31 // RUN: | FileCheck %s
32
33 // RUN: %clang -### -target x86_64 -fcx-limited-range -fno-cx-limited-range \
34 // RUN: -c %s 2>&1 | FileCheck --check-prefix=FULL %s
35
36 // RUN: %clang -### -target x86_64 -ffast-math -c %s 2>&1 \
37 // RUN: | FileCheck --check-prefix=BASIC %s
38
39 // RUN: %clang -### -target x86_64 -ffast-math -fcx-limited-range -c %s 2>&1 \
40 // RUN: | FileCheck --check-prefix=BASIC %s
41
42 // RUN: %clang -### -target x86_64 -fcx-limited-range -ffast-math -c %s 2>&1 \
43 // RUN: | FileCheck --check-prefix=BASIC %s
44
45 // RUN: %clang -### -target x86_64 -ffast-math -fno-cx-limited-range \
46 // RUN: -c %s 2>&1 | FileCheck --check-prefix=FULL %s
47
48 // RUN: not %clang -### -target x86_64 -fcomplex-arithmetic=foo -c %s 2>&1 \
49 // RUN: | FileCheck --check-prefix=ERR %s
50
51 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic -c %s 2>&1 \
52 // RUN: | FileCheck --check-prefix=BASIC %s
53
54 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=improved -c %s 2>&1 \
55 // RUN: | FileCheck --check-prefix=IMPRVD %s
56
57 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=promoted -c %s 2>&1 \
58 // RUN: | FileCheck --check-prefix=PRMTD %s
59
60 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=full -c %s 2>&1 \
61 // RUN: | FileCheck --check-prefix=FULL %s
62
63 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic \
64 // RUN: -fcx-limited-range -c %s 2>&1 \
65 // RUN: | FileCheck --check-prefix=BASIC %s
66
67 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic \
68 // RUN: -fcomplex-arithmetic=improved -c %s 2>&1 \
69 // RUN: | FileCheck --check-prefix=IMPRVD %s
70
71 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic \
72 // RUN: -fcomplex-arithmetic=full -c %s 2>&1 \
73 // RUN: | FileCheck --check-prefix=FULL %s
74
75 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic \
76 // RUN: -fcomplex-arithmetic=promoted -c %s 2>&1 \
77 // RUN: | FileCheck --check-prefix=PRMTD %s
78
79 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=improved \
80 // RUN: -fcomplex-arithmetic=basic -c %s 2>&1 \
81 // RUN: | FileCheck --check-prefix=BASIC %s
82
83 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=improved \
84 // RUN: -fcomplex-arithmetic=full -c %s 2>&1 \
85 // RUN: | FileCheck --check-prefix=FULL %s
86
87 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=improved \
88 // RUN: -fcomplex-arithmetic=promoted -c %s 2>&1 \
89 // RUN: | FileCheck --check-prefix=PRMTD %s
90
91
92 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=promoted \
93 // RUN: -fcomplex-arithmetic=basic -c %s 2>&1 \
94 // RUN: | FileCheck --check-prefix=BASIC %s
95
96 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=promoted \
97 // RUN: -fcomplex-arithmetic=improved -c %s 2>&1 \
98 // RUN: | FileCheck --check-prefix=IMPRVD %s
99
100 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=promoted \
101 // RUN: -fcomplex-arithmetic=full -c %s 2>&1 \
102 // RUN: | FileCheck --check-prefix=FULL %s
103
104 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=full \
105 // RUN: -fcomplex-arithmetic=basic -c %s 2>&1 \
106 // RUN: | FileCheck --check-prefix=BASIC %s
107
108 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=full \
109 // RUN: -fcomplex-arithmetic=improved -c %s 2>&1 \
110 // RUN: | FileCheck --check-prefix=IMPRVD %s
111
112 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=full \
113 // RUN: -fcomplex-arithmetic=promoted -c %s 2>&1 \
114 // RUN: | FileCheck --check-prefix=PRMTD %s
115
116 // RUN: %clang -### -target x86_64 -ffast-math -c %s 2>&1 \
117 // RUN: | FileCheck --check-prefix=BASIC %s
118
119 // RUN: %clang -### -target x86_64 -ffast-math -fcx-limited-range -c %s 2>&1 \
120 // RUN: | FileCheck --check-prefix=BASIC %s
121
122 // RUN: %clang -### -target x86_64 -fcx-limited-range -ffast-math -c %s 2>&1 \
123 // RUN: | FileCheck --check-prefix=BASIC %s
124
125 // RUN: %clang -### -target x86_64 -ffast-math -fno-cx-limited-range -c %s \
126 // RUN: 2>&1 | FileCheck --check-prefix=FULL %s
127
128 // RUN: %clang -### -target x86_64 -ffast-math -fcomplex-arithmetic=basic -c %s 2>&1 \
129 // RUN: | FileCheck --check-prefix=BASIC %s
130
131 // RUN: %clang -### -target x86_64 -fcomplex-arithmetic=basic -ffast-math -c %s 2>&1 \
132 // RUN: | FileCheck --check-prefix=BASIC %s
133
134 // RUN: %clang -### -Werror -target x86_64 -fcx-limited-range -c %s 2>&1 \
135 // RUN: | FileCheck --check-prefix=BASIC %s
136
137 // RUN: %clang -### -target x86_64 -ffast-math -fcomplex-arithmetic=full -c %s 2>&1 \
138 // RUN: | FileCheck --check-prefix=FULL %s
139
140 // RUN: %clang -### -target x86_64 -ffast-math -fcomplex-arithmetic=basic -c %s 2>&1 \
141 // RUN: | FileCheck --check-prefix=BASIC %s
142
143 // RUN: %clang -### --target=x86_64 -fcx-limited-range -fno-fast-math \
144 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
145
146 // RUN: %clang -### -Werror --target=x86_64 -fno-cx-limited-range -fno-fast-math \
147 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
148
149 // RUN: %clang -### --target=x86_64 -fcx-fortran-rules -fno-fast-math \
150 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
151
152 // RUN: %clang -### -Werror --target=x86_64 -fno-cx-fortran-rules -fno-fast-math \
153 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
154
155 // RUN: %clang -### -Werror --target=x86_64 -ffast-math -fno-fast-math \
156 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
157
158 // RUN: %clang -### --target=x86_64 -fcomplex-arithmetic=basic -fno-fast-math \
159 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
160
161 // RUN: %clang -### --target=x86_64 -fcomplex-arithmetic=promoted -fno-fast-math \
162 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
163
164 // RUN: %clang -### --target=x86_64 -fcomplex-arithmetic=improved -fno-fast-math \
165 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
166
167 // RUN: %clang -### -Werror --target=x86_64 -fcomplex-arithmetic=full -fno-fast-math \
168 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
169
170 // RUN: %clang -### -Werror --target=x86_64 -ffp-model=aggressive -fno-fast-math \
171 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
172
173 // RUN: %clang -### -Werror --target=x86_64 -ffp-model=fast -fno-fast-math \
174 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
175
176 // RUN: %clang -### -Werror --target=x86_64 -ffp-model=precise -fno-fast-math \
177 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
178
179 // RUN: %clang -### -Werror --target=x86_64 -ffp-model=strict -fno-fast-math \
180 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=RANGE %s
181
182 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcx-limited-range \
183 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=BASIC %s
184
185 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fno-cx-limited-range \
186 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=FULL %s
187
188 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcx-fortran-rules \
189 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=IMPRVD %s
190
191 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fno-cx-fortran-rules \
192 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=FULL %s
193
194 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -ffast-math \
195 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=BASIC %s
196
197 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcomplex-arithmetic=basic \
198 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=BASIC %s
199
200 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcomplex-arithmetic=promoted \
201 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=PRMTD %s
202
203 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcomplex-arithmetic=improved \
204 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=IMPRVD %s
205
206 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -fcomplex-arithmetic=full \
207 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=FULL %s
208
209 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -ffp-model=aggressive \
210 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=BASIC %s
211
212 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -ffp-model=fast \
213 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=PRMTD %s
214
215 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -ffp-model=precise \
216 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=FULL %s
217
218 // RUN: %clang -### -Werror --target=x86_64 -fno-fast-math -ffp-model=strict \
219 // RUN: -c %s 2>&1 | FileCheck --check-prefixes=FULL %s
220
221 // BASIC: -complex-range=basic
222 // FULL: -complex-range=full
223 // PRMTD: -complex-range=promoted
224 // BASIC-NOT: -complex-range=improved
225 // CHECK-NOT: -complex-range=basic
226 // IMPRVD: -complex-range=improved
227 // IMPRVD-NOT: -complex-range=basic
228 // CHECK-NOT: -complex-range=improved
229 // RANGE-NOT: -complex-range=
230
231 // ERR: error: unsupported argument 'foo' to option '-fcomplex-arithmetic='