blob: b727e3235b8e71018b077a014bf41670049fe857 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* PR sanitizer/108060 */
/* { dg-do run } */
/* { dg-options "-fsanitize=bounds" } */
/* { dg-skip-if "" { *-*-* } "-flto" } */
/* { dg-shouldfail "ubsan" } */
int a[8];
int c;
int
main ()
{
int b = -32768;
a[b] |= c;
}
/* { dg-output "index -32768 out of bounds for type 'int \\\[8\\\]'" } */
|