libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / split-path-13.c
blob8a24972d050ba8af9dd1f136f3b9adf97a28e8ad
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fsplit-paths -fdump-tree-split-paths-details " } */
3 /* PR tree-optimization/112402 */
4 /* This is similar to split-path-2.c but instead of the add
5 being inside both sides, we have a constant. */
7 int
8 foo(signed char *p, int n)
10 int s = 0;
11 int i;
13 for (i = 0; i < n; i++) {
14 int t;
15 if (p[i] >= 0)
16 t = 1;
17 else
18 t = -1;
19 s += t;
22 return s;
25 /* { dg-final { scan-tree-dump "appears to be a join point for if-convertable" "split-paths" } } */