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__attribute__((no_sanitize_undefined, returns_nonnull))
8char *
9foo (char *x)
10{
11  return x;
12}
13
14__attribute__((nonnull)) void bar (char *, int, char *);
15
16__attribute__((no_sanitize_undefined))
17void
18baz (char *x, int y, char *z)
19{
20  bar (x, y, z);
21}
22
23/* { dg-final { scan-assembler-not "__ubsan_handle" } } */
24