aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr67921.c
blob: 728ff93a60f7ee50dd2a5cf3c9de09505a06e1b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-fsanitize=undefined" } */

struct s
{
  int n;
  int arr[][6];
};
void bar (int);
void foo (struct s *ptr)
{
  int i;
  for (; i < 2; i++)
    for (; ptr->n;)
      {
	int *a = ptr->arr[i];
	int b[66];
	int j = 0;

	for (; j < 56; j++)
	  bar (a[j] - b[j]);
    }
}