PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr82363.c
blobbaeb9c3a2d12dd08e7c1ac821d6a1550e01bfe7e
1 /* { dg-do run } */
2 /* { dg-options "-O" } */
4 #if __SIZEOF_INT__ == 2
5 #define int __INT32_TYPE__
6 #endif
8 struct A
10 int b;
11 int c;
12 int d;
15 struct E
17 int f;
18 int g:18;
19 struct A h;
22 struct I
24 int b;
25 int j;
26 struct E k;
29 int l, *m = &l;
31 struct A n;
32 struct I o;
34 void __attribute__ ((noipa))
35 test_l (void)
37 if (l != 1)
38 __builtin_abort ();
41 #undef int
43 int main ()
45 while (1)
47 struct I q = { 0, 0, {0, 0, {1, 1, 1}}}, p = q, r = p, *s = &q;
48 if (p.k.h.c)
49 o = p;
50 *m = r.k.h.d;
51 n = (*s).k.h;
52 break;
54 test_l ();
55 return 0;