2 /* { dg-options "-fsanitize=bounds -fno-sanitize-recover=bounds -Wall" } */
4 /* Don't fail on valid uses. */
6 struct S
{ int a
[10]; };
7 struct T
{ int l
; int a
[]; };
8 struct U
{ int l
; int a
[0]; };
9 struct V
{ int l
; int a
[1]; };
11 __attribute__ ((noinline
, noclone
))
17 __attribute__ ((noinline
, noclone
))
19 fn_a (volatile int a
[])
21 /* This is not instrumented. */
25 __attribute__ ((noinline
, noclone
))
56 volatile int c
[n
][n
][n
];
64 /* Don't instrument flexible array members. */
65 struct T
*t
= (struct T
*) __builtin_malloc (sizeof (struct T
) + 10);
68 /* Don't instrument zero-sized arrays (GNU extension). */
69 struct U
*u
= (struct U
*) __builtin_malloc (sizeof (struct U
) + 10);
72 /* Don't instrument last array in a struct. */
73 struct V
*v
= (struct V
*) __builtin_malloc (sizeof (struct V
) + 10);
77 d
[9][0] = (long int *) 0;