libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr92706-2.c
blob37ab9765db0177c9284b82520870aab0e03e1e38
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-esra" } */
4 typedef __UINT64_TYPE__ uint64_t;
5 typedef __UINT32_TYPE__ uint32_t;
6 struct S { uint32_t i[2]; } __attribute__((aligned(__alignof__(uint64_t))));
7 typedef uint64_t my_int64 __attribute__((may_alias));
8 uint64_t load (void *p)
10 struct S u, v, w;
11 uint64_t tem;
12 tem = *(my_int64 *)p;
13 *(my_int64 *)&v = tem;
14 u = v;
15 w = u;
16 return *(my_int64 *)&w;
19 /* { dg-final { scan-tree-dump "Created a replacement for v" "esra" } } */