LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / vrp5.c
blob571798dab511f5400881b45b6ee1770e8d0b8967
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-cp-details -fdump-tree-vrp1" } */
4 static __attribute__((noinline, noclone))
5 int foo (int *p)
7 if (!p)
8 return 0;
9 *p = 1;
12 struct st
14 int a;
15 int b;
18 int arr1[10];
19 int a;
20 int bar (struct st *s)
22 int arr2[10];
23 int b;
24 if (!s)
25 return 0;
26 foo (&s->a);
27 foo (&a);
28 foo (&b);
29 foo (&arr1[1]);
30 foo (&arr2[1]);
33 /* { dg-final { scan-ipa-dump "Setting nonnull for 0" "cp" } } */
34 /* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */