1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fdump-ipa-cp-details -fdump-tree-vrp1" } */ 3 4 static __attribute__((noinline, noclone)) foo(int * p)5int foo (int *p) 6 { 7 if (!p) 8 return 0; 9 *p = 1; 10 } 11 12 struct st 13 { 14 int a; 15 int b; 16 }; 17 bar(struct st * s)18int bar (struct st *s) 19 { 20 21 if (!s) 22 return 0; 23 foo (&s->a); 24 foo (&s->b); 25 } 26 27 /* { dg-final { scan-ipa-dump "Setting nonnull for 0" "cp" } } */ 28 /* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */ 29