Debian Codegraph @

gcc/testsuite/c-c++-common/ubsan/attrib-4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=undefined" } */
3
4 /* Test that we don't instrument functions marked with
5 no_sanitize_undefined attribute. */
6
7 struct S { int a[16]; };
8
9 __attribute__((no_sanitize_undefined)) long long
10 foo (int *a, long long *b, struct S *c)
11 {
12 return a[1] + *b + c->a[a[0]];
13 }
14
15 /* { dg-final { scan-assembler-not "__ubsan_handle" } } */