1 /* Check that we properly report mmap failure. */
3 /* { dg-do run { target setrlimit } } */
4 /* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
5 /* { dg-require-effective-target hw } */
6 /* { dg-shouldfail "asan" } */
11 #include <sys/resource.h>
13 static volatile void *x;
15 int main(int argc, char **argv) {
16 struct rlimit mmap_resource_limit = { 0, 0 };
17 if (setrlimit(RLIMIT_AS, &mmap_resource_limit)) return 1;
22 /* { dg-output "ERROR: Failed to mmap" } */