libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr108354-1.c
blob60d1dbc281ece3bd8bea9618c767325333a85392
1 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 int b;
4 int *c;
5 int e;
6 static int *f = &e;
7 int g;
8 void foo();
9 short(a)(short h, short i) { return h - i; }
10 int(d)(int h) { return h == 83647 ? 0 : -h; }
11 int main() {
12 short j;
13 int *k = &e, *l = &b;
14 *f = 0 == c;
15 j = a(0 != 2, *k);
16 if (d(j ^ (0 == l || *k)) != *k)
18 else
19 foo();
20 c = &g;
23 /* { dg-final { scan-tree-dump-times " 1 - " 0 "optimized" } } */
24 /* There should be no calls to foo. */
25 /* { dg-final { scan-tree-dump-times "foo " 0 "optimized" } } */