aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr71801.c
blob: 6c87522f31d508d5f095a98a944441b8cf323d5f (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 -g" } */

struct {
  char uuid[16];
} c;
struct {
  int s_uuid[6];
} a, b;
int bar (void);
static int get_label_uuid(char *p1) {
  __builtin_memcpy(p1, a.s_uuid, sizeof(a));
  if (bar())
    __builtin_memcpy(p1, b.s_uuid, sizeof(b));
  return 0;
}
void uuidcache_addentry(char *p1) { __builtin_memcpy(&c, p1, sizeof(c)); }
void uuidcache_init() {
  char d[1];
  get_label_uuid(d);
  uuidcache_addentry(d);
}