Debian Codegraph @

gcc/testsuite/c-c++-common/hwasan/aligned-alloc.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target hwaddress_exec } */
3 /* { dg-shouldfail "hwasan" } */
4 /* This program fails at runtime in the libhwasan library.
5 The allocator can't handle the requested invalid alignment. */
6
7 int
8 main ()
9 {
10 void *p = __builtin_aligned_alloc (17, 100);
11 if (((unsigned long long)p & 0x10) == 0)
12 return 0;
13 return 1;
14 }
15
16 /* { dg-output "HWAddressSanitizer: invalid alignment requested in aligned_alloc: 17" } */