Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=undefined" } */
3
4 static void __attribute__((no_sanitize("foobar")))
5 foo (void) { /* { dg-warning "attribute directive ignored" } */
6 }
7
8 static void __attribute__((no_sanitize("address,undefined")))
9 foo2 (void) {
10 }
11
12 static void __attribute__((no_sanitize("address", "undefined")))
13 foo3 (void) {
14 }
15
16 static void __attribute__((no_sanitize("address", "address", "")))
17 foo4 (void) {
18 }
19
20 static void __attribute__((no_sanitize("address", "address", "address,address")))
21 foo5 (void) {
22 }
23
24 static void __attribute__((no_sanitize("address", "address,kernel-address,thread,leak,undefined,vptr,shift,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,bounds-strict,alignment,object-size,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum")))
25 foo6 (void) {
26 }