1/* PR sanitizer/65280 */
2/* { dg-do run } */
3/* { dg-options "-fsanitize=bounds" } */
4
5int
6main (void)
7{
8  int *t = (int *) __builtin_malloc (sizeof (int) * 10);
9  int (*a)[1] = (int (*)[1]) t;
10  (*a)[2] = 1;
11}
12
13/* { dg-output "index 2 out of bounds for type 'int \\\[1\\\]'\[^\n\r]*(\n|\r\n|\r)" } */
14