1 /* { dg-do run } */ 2 /* { dg-options "-ftree-vrp" } */ 3 4 struct S {struct S *field;}; 5 struct S True, False, Z; f(void)6static inline int f(void) {return 1;} g(struct S ** obj)7static inline int g(struct S **obj) { 8 return f() && *obj == &Z; 9 } h(struct S ** x)10struct S **h(struct S **x) { 11 if (x) 12 return g(x) ? &True.field : &False.field; 13 else 14 return &True.field; 15 } 16 extern void abort (void); main()17int main() 18 { 19 if (h(&False.field) != &False.field) 20 abort (); 21 return 0; 22 } 23