Lines Matching refs:mempcpy
152 // mempcpy()
161 #define mempcpy(a,b,c) __mempcpy_chk(a,b,c,(size_t)-1)
165 #define mempcpy BUILTIN(mempcpy)
166 void *mempcpy(void *restrict s1, const void *restrict s2, size_t n);
175 mempcpy(dst, src, 4); // no-warning
177 if (mempcpy(dst, src, 4) != &dst[4]) {
189 mempcpy(dst, src, 5); // expected-warning{{Memory copy function accesses out-of-bound array element}}
196 mempcpy(dst, src, 4); // expected-warning{{Memory copy function overflows destination buffer}}
203 mempcpy(dst+1, src+2, 2); // no-warning
210 mempcpy(dst+2, src+2, 3); // expected-warning{{Memory copy function accesses out-of-bound array element}}
217 mempcpy(dst+2, src+2, 2); // expected-warning{{Memory copy function overflows destination buffer}}
222 mempcpy(a, a, 8); // expected-warning{{overlapping}}
227 mempcpy(a+2, a+1, 8); // expected-warning{{overlapping}}
232 mempcpy(a+1, a+2, 8); // expected-warning{{overlapping}}
237 mempcpy(a+2, a+1, 4); // no-warning
238 mempcpy(a+1, a+2, 4); // no-warning
243 mempcpy(0, a, 4); // expected-warning{{Null pointer argument in call to memory copy function}}
248 mempcpy(a, 0, 4); // expected-warning{{Null pointer argument in call to memory copy function}}
253 mempcpy(0, a, 0); // no-warning
258 mempcpy(a, 0, 0); // no-warning
263 if (mempcpy(a, 0, n) != a) // expected-warning{{Null pointer argument in call to memory copy function}}
270 mempcpy(a, src, (size_t)n);