aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr86010-2.c
blob: 4c82e65aeb5c42fbd47f58d3a70d50012f989230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

void f (void*);

void g (char *a)
{
  __builtin_memset (a, 0, 8);
  __builtin_memset (a, 0, 8);

  f (a);
}

void h (char *a)
{
  __builtin_memset (a, 0, 8);
  __builtin_memset (a, 0, 7);

  f (a);
}

/* { dg-final { scan-tree-dump-times "__builtin_memset" 2 "optimized" } } */