2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr71801.c
blob6c87522f31d508d5f095a98a944441b8cf323d5f
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -g" } */
4 struct {
5 char uuid[16];
6 } c;
7 struct {
8 int s_uuid[6];
9 } a, b;
10 int bar (void);
11 static int get_label_uuid(char *p1) {
12 __builtin_memcpy(p1, a.s_uuid, sizeof(a));
13 if (bar())
14 __builtin_memcpy(p1, b.s_uuid, sizeof(b));
15 return 0;
17 void uuidcache_addentry(char *p1) { __builtin_memcpy(&c, p1, sizeof(c)); }
18 void uuidcache_init() {
19 char d[1];
20 get_label_uuid(d);
21 uuidcache_addentry(d);