| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-options "-fsanitize=undefined -fno-sanitize-recover=undefined" } */ |
| 3 |
|
| 4 |
__attribute__((noipa, nonnull_if_nonzero (1, 4))) |
| 5 |
__attribute__((nonnull (3), nonnull_if_nonzero (5, 2))) void |
| 6 |
foo (void *a, unsigned long b, void *c, int d, void *e) |
| 7 |
{ |
| 8 |
(void) a; |
| 9 |
(void) b; |
| 10 |
(void) c; |
| 11 |
(void) d; |
| 12 |
(void) e; |
| 13 |
} |
| 14 |
|
| 15 |
__attribute__((noipa)) |
| 16 |
void |
| 17 |
bar (void *a, unsigned long b, void *c, int d, void *e) |
| 18 |
{ |
| 19 |
foo (a, b, c, d, e); |
| 20 |
} |
| 21 |
|
| 22 |
int |
| 23 |
main () |
| 24 |
{ |
| 25 |
char x; |
| 26 |
bar (&x, 42, &x, 1, &x); |
| 27 |
bar (0, 0, &x, 0, 0); |
| 28 |
} |