blob: e306a71be93660463cd9d76a203a7661a51c5c42 [file] [log] [blame]
/* { dg-do run } */
/* { dg-shouldfail "asan" } */
__attribute__((noinline,noclone)) void
foo (char *a, char *b) {
a[0] = b[0] = 0;
__builtin_memcpy(a, b, 4);
}
int
main () {
char a, b;
foo (&a, &b);
return 0;
}
/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */