Lines Matching refs:CPY

137 #define CPY(d, s, len) (strncpy ((d), (s), (len)), sink (d))  in test_strncpy_ptr()  macro
140CPY (d, "", 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_ptr()
141CPY (d, s, 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_ptr()
144 CPY (d, "", 1); in test_strncpy_ptr()
145 CPY (d, "", 2); in test_strncpy_ptr()
148 CPY (d, s, 1); in test_strncpy_ptr()
149 CPY (d, s, 2); in test_strncpy_ptr()
152CPY (d, "123", 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated copying 1 b… in test_strncpy_ptr()
153CPY (d, "123", 2); /* { dg-warning ".strncpy\[^\n\r\]* output truncated copying 2 b… in test_strncpy_ptr()
154CPY (d, "123", 3); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
155 CPY (d, "123", 4); in test_strncpy_ptr()
156 CPY (d, "123", 9); in test_strncpy_ptr()
158 CPY (d, S4, sizeof S4); /* Covered by -Wsizeof-pointer-memaccess. */ in test_strncpy_ptr()
159CPY (d, S4, sizeof S4 - 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
161 CPY (d, a4, sizeof a4); /* Covered by -Wsizeof-pointer-memaccess. */ in test_strncpy_ptr()
162CPY (d, a4, sizeof a4 - 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
163CPY (d, a4, sizeof a4 - 3); /* { dg-warning ".strncpy\[^\n\r\]* output truncated copying 1 b… in test_strncpy_ptr()
164CPY (d, a4, sizeof a4 - 4); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_ptr()
166CPY (d, S4, strlen (S4)); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
168 CPY (d, a4, strlen (a4) + 1); in test_strncpy_ptr()
169 CPY (d, S4, strlen (S4) + i); in test_strncpy_ptr()
171CPY (d, a4, strlen (a4)); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
173 CPY (d, S4, strlen (S4) + 1); in test_strncpy_ptr()
175CPY (d, CHOOSE ("", "1"), 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_ptr()
176CPY (d, CHOOSE ("1", "12"), 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_ptr()
178CPY (d, CHOOSE ("", "1"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output may be truncated copy… in test_strncpy_ptr()
179CPY (d, CHOOSE ("1", ""), 1); /* { dg-warning ".strncpy\[^\n\r\]* output may be truncated copy… in test_strncpy_ptr()
180CPY (d, CHOOSE (s, "1"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output may be truncated copy… in test_strncpy_ptr()
181 CPY (d, CHOOSE (s, t), 1); in test_strncpy_ptr()
183 CPY (d, CHOOSE ("", "1"), 2); in test_strncpy_ptr()
184 CPY (d, CHOOSE ("1", ""), 2); in test_strncpy_ptr()
185 CPY (d, CHOOSE ("1", "2"), 2); in test_strncpy_ptr()
186 CPY (d, CHOOSE ("1", s), 2); in test_strncpy_ptr()
187 CPY (d, CHOOSE (s, "1"), 2); in test_strncpy_ptr()
188 CPY (d, CHOOSE (s, t), 2); in test_strncpy_ptr()
190CPY (d, CHOOSE ("", "123"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output may be truncated copy… in test_strncpy_ptr()
191CPY (d, CHOOSE ("1", "123"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_ptr()
192CPY (d, CHOOSE ("12", "123"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated copying 1 b… in test_strncpy_ptr()
193CPY (d, CHOOSE ("123", "12"), 1); /* { dg-warning ".strncpy\[^\n\r\]* output truncated copying 1 b… in test_strncpy_ptr()
197CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
202CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
207CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
212CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
218CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
225CPY (dp2, s, n); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before termin… in test_strncpy_ptr()
234 CPY (d, s, n); in test_strncpy_ptr()
241 CPY (d, s, n); in test_strncpy_ptr()
246CPY (d, s, n); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after co… in test_strncpy_ptr()
266 #undef CPY in test_strncpy_array()
267 #define CPY(d, s, len) (strncpy ((d), (s), (len)), sink (d)) in test_strncpy_array() macro
269 CPY (dst7, s, 7); /* { dg-warning "specified bound 7 equals destination size" } */ in test_strncpy_array()
270 CPY (dst7, s, sizeof dst7); /* { dg-warning "specified bound 7 equals destination size" } */ in test_strncpy_array()
272CPY (dst2_5[0], s, sizeof dst2_5[0]); /* { dg-warning "specified bound 5 equals destination size" … in test_strncpy_array()
273CPY (dst2_5[1], s, sizeof dst2_5[1]); /* { dg-warning "specified bound 5 equals destination size" … in test_strncpy_array()
276 CPY (dst7, "", sizeof dst7); in test_strncpy_array()
277 CPY (dst7 + 6, "", sizeof dst7 - 6); in test_strncpy_array()
278 CPY (dst7, "1", sizeof dst7); in test_strncpy_array()
279 CPY (dst7 + 1, "1", sizeof dst7 - 1); in test_strncpy_array()
280 CPY (dst7, "123456", sizeof dst7); in test_strncpy_array()
281 CPY (dst7 + 1, "12345", sizeof dst7 - 1); in test_strncpy_array()
283 CPY (dst7 + i, s, 6); in test_strncpy_array()
284 CPY (dst7 + i, s, 7); /* { dg-warning "specified bound 7 equals destination size" } */ in test_strncpy_array()
286 CPY (dst7 + i, s, 8); in test_strncpy_array()
287 CPY (dst7 + i, s, UR (8, 9)); in test_strncpy_array()
290CPY (dst7 + 2, "12345", sizeof dst7 - 2); /* { dg-warning "output truncated before terminating… in test_strncpy_array()
295 CPY (dst7, s, 8); in test_strncpy_array()
297 CPY (dst7 + 1, s, 6); /* { dg-warning "specified bound 6 equals destination size" } */ in test_strncpy_array()
298 CPY (dst7 + 6, s, 1); /* { dg-warning "specified bound 1 equals destination size" } */ in test_strncpy_array()
300 CPY (pd->a5, s, 5); /* { dg-warning "specified bound 5 equals destination size" } */ in test_strncpy_array()
301 CPY (pd->a5, s, sizeof pd->a5); /* { dg-warning "specified bound 5 equals destination size" } */ in test_strncpy_array()
304CPY (pd->a5 + i, s, sizeof pd->a5); /* { dg-warning "specified bound 5 equals destination size" … in test_strncpy_array()
307 CPY (pd->a5, "1234", sizeof pd->a5); in test_strncpy_array()
310 CPY (pd->a5, s, 6); in test_strncpy_array()
313 CPY (pd->c3ns, "", 3); in test_strncpy_array()
314 CPY (pd->c3ns, "", 1); in test_strncpy_array()
319 CPY (pd->c3ns, "12", 1); in test_strncpy_array()
320 CPY (pd->c3ns, "12", 2); in test_strncpy_array()
321 CPY (pd->c3ns, "12", 3); in test_strncpy_array()
322 CPY (pd->c3ns, "123", 3); in test_strncpy_array()
323 CPY (pd->c3ns, s, 3); in test_strncpy_array()
324 CPY (pd->c3ns, s, sizeof pd->c3ns); in test_strncpy_array()
398 #undef CPY in test_strncpy_flexarray()
399 #define CPY(d, s, len) (strncpy ((d), (s), (len)), sink (d)) in test_strncpy_flexarray() macro
401 CPY (array, "12345", 7); in test_strncpy_flexarray()
402 CPY (array, "12345", 123); in test_strncpy_flexarray()
404 CPY (array, s, 7); in test_strncpy_flexarray()
405 CPY (array, s, 123); in test_strncpy_flexarray()
407 CPY (pf->a0, s, 1); in test_strncpy_flexarray()
408 CPY (pf->a0, s, 1234); in test_strncpy_flexarray()
410 CPY (pf->a0, "", 1); in test_strncpy_flexarray()
411CPY (pf->a0, "12345", 5); /* { dg-warning "output truncated before terminating nul copyin… in test_strncpy_flexarray()
412 CPY (pf->a0, "12345", 1234); in test_strncpy_flexarray()
414 CPY (pf->ax, s, 5); in test_strncpy_flexarray()
415 CPY (pf->ax, s, 12345); in test_strncpy_flexarray()
417 CPY (pf->ax, "1234", 5); in test_strncpy_flexarray()
418CPY (pf->ax, "12345", 5); /* { dg-warning "output truncated before terminating nul copying… in test_strncpy_flexarray()
419 CPY (pf->ax, "12345", 12345); in test_strncpy_flexarray()
429CPY (d, s, n); /* { dg-warning "specified bound 7 equals destination size" "bug… in test_strncpy_alloc()
432 CPY (pd->a5, s, 5); /* { dg-warning "specified bound 5 equals destination size" } */ in test_strncpy_alloc()
433 CPY (pd->a5, s, sizeof pd->a5); /* { dg-warning "specified bound 5 equals destination size" } */ in test_strncpy_alloc()
441CPY (vla, s, 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_vla()
443 CPY (vla, s, 1); in test_strncpy_vla()
444 CPY (vla, s, 2); in test_strncpy_vla()
445 CPY (vla, s, n); in test_strncpy_vla()
447CPY (vla, "", 0); /* { dg-warning ".strncpy\[^\n\r\]* destination unchanged after … in test_strncpy_vla()
448 CPY (vla, "", 1); in test_strncpy_vla()
449CPY (vla, S4, 3); /* { dg-warning ".strncpy\[^\n\r\]* output truncated before term… in test_strncpy_vla()
450 CPY (vla, S4, n); in test_strncpy_vla()