aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/asan/pr56330.c
blob: 25759f4ec9e9faf203ca7c7ef16bf2ff5b26d912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* PR sanitizer/56330 */
/* { dg-do compile } */

char e[200];

struct S
{
  char a[100];
  char b[100];
} s;

int
foo (void)
{
  int i = __builtin_memcmp (s.a, e, 100);
  i += __builtin_memcmp (s.a, e, 200);
  return i;
}

void
bar (int *a, char *b, char *c)
{
  __builtin_memmove (c, b, a[b[0]]);
}