libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-sink-19.c
blobe98d13fe85bbbfc9b2ff45f23d775f1e8f5265f1
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-sink1-details -fdump-tree-cddce2-details" } */
4 static int b=4;
5 int c;
7 int
8 main()
10 int e[5] = {1,1,1,1,1};
11 for (; b >= 0; b--) {
12 c = e[b];
14 return 0;
17 /* We should sink e[b] out of the loop which is possible after
18 applying store motion to c and b. */
19 /* { dg-final { scan-tree-dump "Sinking # VUSE" "sink1" } } */
20 /* And remove the loop after final value replacement. */
21 /* { dg-final { scan-tree-dump "fix_loop_structure: removing loop" "cddce2" } } */