PR c/64856
[official-gcc.git] / gcc / testsuite / gcc.dg / pr61762.c
blob47dc140248c7352e6f2cedbdf236a16e31f46dff
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-release_ssa" } */
4 unsigned int f()
6 static const char string[] __attribute__((aligned(sizeof(int)))) = "Private";
8 unsigned int priv;
9 __builtin_memcpy(&priv, &string[0], sizeof(priv));
10 return priv;
13 /* We should have removed the static string and simplified the
14 memcpy to a store from an integer constant. CCP
15 already performs the simplification but only after release_ssa
16 the unused local static is removed. */
18 /* { dg-final { scan-tree-dump-not "Private" "release_ssa" } } */
19 /* { dg-final { cleanup-tree-dump "release_ssa" } } */