libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr102906.c
blob1846f0b6dba3a9bc2dfe998f2e03d78744bb94b2
1 // { dg-do compile }
2 // { dg-options "-Os -fdump-tree-ch-details" }
4 extern unsigned int foo (int*) __attribute__((pure));
6 unsigned int
7 tr2 (int array[], int n)
9 unsigned int sum = 0;
10 int x;
11 if (n > 0)
12 for (x = 0; x < n; x++)
13 sum += foo (&array[x]);
14 return sum;
17 // { dg-final { scan-tree-dump-not "Not duplicating.*optimizing for size" "ch2" } }