1 // RUN: %clang_cc1 -fsyntax-only -std=c99 %s
2 
3 // This test simply tests that the compiler does not crash.  An optimization
4 // in ParmVarDecls means that functions with fewer than 256 parameters use a fast path,
5 // while those with >= 256 parameters use a slow path.
6 //
7 // Crash was reported in PR 10538.
8 
9 void foo(
10 int x0,
11 int x1,
12 int x2,
13 int x3,
14 int x4,
15 int x5,
16 int x6,
17 int x7,
18 int x8,
19 int x9,
20 int x10,
21 int x11,
22 int x12,
23 int x13,
24 int x14,
25 int x15,
26 int x16,
27 int x17,
28 int x18,
29 int x19,
30 int x20,
31 int x21,
32 int x22,
33 int x23,
34 int x24,
35 int x25,
36 int x26,
37 int x27,
38 int x28,
39 int x29,
40 int x30,
41 int x31,
42 int x32,
43 int x33,
44 int x34,
45 int x35,
46 int x36,
47 int x37,
48 int x38,
49 int x39,
50 int x40,
51 int x41,
52 int x42,
53 int x43,
54 int x44,
55 int x45,
56 int x46,
57 int x47,
58 int x48,
59 int x49,
60 int x50,
61 int x51,
62 int x52,
63 int x53,
64 int x54,
65 int x55,
66 int x56,
67 int x57,
68 int x58,
69 int x59,
70 int x60,
71 int x61,
72 int x62,
73 int x63,
74 int x64,
75 int x65,
76 int x66,
77 int x67,
78 int x68,
79 int x69,
80 int x70,
81 int x71,
82 int x72,
83 int x73,
84 int x74,
85 int x75,
86 int x76,
87 int x77,
88 int x78,
89 int x79,
90 int x80,
91 int x81,
92 int x82,
93 int x83,
94 int x84,
95 int x85,
96 int x86,
97 int x87,
98 int x88,
99 int x89,
100 int x90,
101 int x91,
102 int x92,
103 int x93,
104 int x94,
105 int x95,
106 int x96,
107 int x97,
108 int x98,
109 int x99,
110 int x100,
111 int x101,
112 int x102,
113 int x103,
114 int x104,
115 int x105,
116 int x106,
117 int x107,
118 int x108,
119 int x109,
120 int x110,
121 int x111,
122 int x112,
123 int x113,
124 int x114,
125 int x115,
126 int x116,
127 int x117,
128 int x118,
129 int x119,
130 int x120,
131 int x121,
132 int x122,
133 int x123,
134 int x124,
135 int x125,
136 int x126,
137 int x127,
138 int x128,
139 int x129,
140 int x130,
141 int x131,
142 int x132,
143 int x133,
144 int x134,
145 int x135,
146 int x136,
147 int x137,
148 int x138,
149 int x139,
150 int x140,
151 int x141,
152 int x142,
153 int x143,
154 int x144,
155 int x145,
156 int x146,
157 int x147,
158 int x148,
159 int x149,
160 int x150,
161 int x151,
162 int x152,
163 int x153,
164 int x154,
165 int x155,
166 int x156,
167 int x157,
168 int x158,
169 int x159,
170 int x160,
171 int x161,
172 int x162,
173 int x163,
174 int x164,
175 int x165,
176 int x166,
177 int x167,
178 int x168,
179 int x169,
180 int x170,
181 int x171,
182 int x172,
183 int x173,
184 int x174,
185 int x175,
186 int x176,
187 int x177,
188 int x178,
189 int x179,
190 int x180,
191 int x181,
192 int x182,
193 int x183,
194 int x184,
195 int x185,
196 int x186,
197 int x187,
198 int x188,
199 int x189,
200 int x190,
201 int x191,
202 int x192,
203 int x193,
204 int x194,
205 int x195,
206 int x196,
207 int x197,
208 int x198,
209 int x199,
210 int x200,
211 int x201,
212 int x202,
213 int x203,
214 int x204,
215 int x205,
216 int x206,
217 int x207,
218 int x208,
219 int x209,
220 int x210,
221 int x211,
222 int x212,
223 int x213,
224 int x214,
225 int x215,
226 int x216,
227 int x217,
228 int x218,
229 int x219,
230 int x220,
231 int x221,
232 int x222,
233 int x223,
234 int x224,
235 int x225,
236 int x226,
237 int x227,
238 int x228,
239 int x229,
240 int x230,
241 int x231,
242 int x232,
243 int x233,
244 int x234,
245 int x235,
246 int x236,
247 int x237,
248 int x238,
249 int x239,
250 int x240,
251 int x241,
252 int x242,
253 int x243,
254 int x244,
255 int x245,
256 int x246,
257 int x247,
258 int x248,
259 int x249,
260 int x250,
261 int x251,
262 int x252,
263 int x253,
264 int x254,
265 int x255,
266 int x256,
267 int x257,
268 int x258,
269 int x259,
270 int x260,
271 int x261,
272 int x262,
273 int x263,
274 int x264,
275 int x265,
276 int x266,
277 int x267,
278 int x268,
279 int x269,
280 int x270,
281 int x271,
282 int x272,
283 int x273,
284 int x274,
285 int x275,
286 int x276,
287 int x277,
288 int x278,
289 int x279,
290 int x280,
291 int x281,
292 int x282,
293 int x283,
294 int x284,
295 int x285,
296 int x286,
297 int x287,
298 int x288,
299 int x289,
300 int x290,
301 int x291,
302 int x292,
303 int x293,
304 int x294,
305 int x295,
306 int x296,
307 int x297,
308 int x298,
309 int x299
310 );
311