Debian Codegraph @

gcc/testsuite/gcc.dg/vect/bb-slp-pr95271.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target stdint_types } */
3 /* { dg-additional-options "-march=cooperlake" { target x86_64-*-* i?86-*-* } } */
4
5 #include <stdint.h>
6
7 int a;
8 struct b c;
9 int64_t d;
10 struct b {
11 uint64_t address;
12 uint64_t e;
13 };
14 void f()
15 {
16 d = (int64_t)(&a)[0] << 56 | (int64_t)((unsigned char *)&a)[1] << 48 |
17 (int64_t)((unsigned char *)&a)[2] << 40 |
18 (int64_t)((unsigned char *)&a)[3] << 32 |
19 (int64_t)((unsigned char *)&a)[4] << 24 | ((unsigned char *)&a)[5] << 16 |
20 ((unsigned char *)&a)[6] << 8 | ((unsigned char *)&a)[7];
21 c.address = c.e = d;
22 }